More or less correct. The density here refers not to a mass density but a density along the frequency (or wavelength) axis. Just bear in mind that the energy of a photon is related to it's frequency, and the total energy emitted at that frequency is scaled by the number of photons at that frequency. When you take those two ideas together, and plot as a function of amount of energy emitted as a function of frequency, that's essentially your energy spectral density. Note that the energy spectral density is expressed at an instant of time. A related concept, power spectral density, averages the energy spectral density over long periods of time (power = energy/time).