Solving Quadratic Systems with Full-Rank Matrices Using Sparse or Generative Priors