Two-photon spectra of quantum emitters