The expectation in power spectral density
I think a better definition of the power spectrum is the following:


  The power spectrum of $x(t)$ is the Fourier transform of the autocorrelation function of $x(t)$, where $x(t)$ can be either a deterministic power signal, or a wide-sense stationary (WSS) random process. The definition of the autocorrelation function depends on the model for $x(t)$.


If $x(t)$ is modeled as a WSS random process, then the autocorrelation function is defined by

$$R_x(\tau)=E\big\{x^*(t)x(t+\tau)\big\}\tag{1}$$

For deterministic power signals, the autocorrelation function is given by

$$R_x(\tau)=\lim_{T\to\infty}\frac{1}{T}\int_{-T/2}^{T/2}x^*(t)x(t+\tau)dt\tag{2}$$

In this answer it is shown that the following definition of the power spectrum for a WSS random process $x(t)$

$$S_x(\omega)=\lim_{T\rightarrow\infty}E\left\{ \frac{1}{T}\left| \int_{-T/2}^{T/2}x(t)e^{-j\omega t}dt \right|^2 \right\}\tag{3}$$

is equivalent to the definition of the power spectrum as the Fourier transform of $(1)$.

For deterministic power signals, the corresponding definition of the power spectrum is

$$S_x(\omega)=\lim_{T\rightarrow\infty}\frac{1}{T}\left| \int_{-T/2}^{T/2}x(t)e^{-j\omega t}dt \right|^2 \tag{4}$$

which can also be shown to be equivalent to the Fourier transform of $(2)$.

The definitions of autocorrelation and power spectrum of deterministic power signals is described in Chapter 12 of

Papoulis, A., The Fourier Integral and its Applications, McGraw Hill, 1962.

A good reference on random processes and the corresponding definitions of autocorrelation and power spectra is

Papoulis, A. and S.U. Pillai, Probability, random
variables, and stochastic processes, Boston: McGraw-Hill, 2002.