Existence and nonexistence of solutions for singular quadratic quasilinear equations