Spectrum of the relic neutrino background from past supernovae and cosmological models