Spectral density is a term used in signal processing and time series analysis. (Similar terms are used to describe the distribution of electromagnetic radiation or other frequency-related phenomena.)
Power spectral density (PSD) is the distribution of power as described by the Fourier transform of the auto-correlation function of a signal. It shows the strength of the variations in power as a function of frequency.
Energy spectral density (ESD) is similar, taken over a specific interval of time.
The terms energy and power are, in a sense, "borrowed", used because one is an amount and the other a rate of the same concept over time, analogous to how the terms are used for physical energy.
The terms can be used for analysis of a continuous signal, at least in theory, but modern electronics and data collection is generally digital and records and analyzes a discrete signal formed by sampling, taking periodic samples from an incoming signal (such as a voltage output from a radio telescope antenna over time), thus time series analysis. In the discrete case, the analysis is on a sequence of numbers, using computer algorithms, e.g., for the Fourier analysis, using the fast Fourier transform (calculating the discrete Fourier transform).