We develop a non-perturbative description of spontaneous parametric downconversion in the high-gain regime for nanostructured systems with arbitrary amount of loss and dispersion, and use it numerically to investigate integrated quantum spectroscopy at high gain.