PSDs and Parseval's theorem
That equation is indeed simple, but it's also wrong. So your doubts are completely justified. What is probably meant is something like

$$S_X(f)=\lim_{T\rightarrow\infty}\frac{1}{T}\left|X_T(f)\right|^2\tag{1}$$

with

$$X_T(f)=\int_{-T/2}^{T/2}x(t)e^{-j2\pi f t}dt\tag{2}$$

This definition of the power spectrum is used for functions $x(t)$ with finite power (but infinite energy) for which the Fourier integral does not exist.