Text this: Spectral representation of cosmological correlators