In a recent Letter, Dornheim et al. [PRL 125, 085001 (2020)] have investigated the nonlinear density response of the uniform electron gas in the warm dense matter regime. More specifically, they have studied the cubic response function at the first harmonic, which cannot be neglected in many situations of experimental relevance. In this work, we go one step further and study the full spectrum of excitations at the higher harmonics of the original perturbation based on extensive new ab initio path integral Monte Carlo (PIMC) simulations. We find that the dominant contribution to the density response beyond linear response theory is given by the quadratic response function at the second harmonic in the moderately nonlinear regime. Furthermore, we show that the nonlinear density response is highly sensitive to exchange-correlation effects, which makes it a potentially valuable new tool of diagnostics. To this end, we present a new theoretical description of the nonlinear electronic density response based on the recent effective static approximation to the local field correction [PRL 125, 235001 (2020)], which accurately reproduces our PIMC data with negligible computational cost.