In Durrett's Probability Theory and Examples theorem 5.1.8 says:
Suppose that $\mathbb{E} X^2 <\infty$. Then $\mathbb{E}(X| \mathcal{F})$ is the variable $Y \in \mathcal{F}$ that minimizes the "mean square error" $\mathbb{E}(X-Y)^2$.
To explain notation, it is assumed we are working with the probability space $(\Omega, \mathcal{F}_{0}, P)$, and $\mathcal{F}\subset \mathcal{F}_{0}$ is a sub $\sigma-$field of the $\sigma-$field $\mathcal{F}_{0}$.
Durrett then goes on to explain that $\mathbb{E}(X| \mathcal{F})$ is the projection of $X$ onto the Hilbert space $L^{2}(\mathcal{F}) = \{ Y \in \mathcal{F} : \mathbb{E} Y^2 <\infty \}$.
As far as I can see, for this to be true it must be that $\mathbb{E}[X^{2}]<\infty$ implies $\mathbb{E}[X | \mathcal{F}]^{2}<\infty$. However, I have not been able to show this using the measure-theoretic definition of conditional expectation.
Can anyone provide a proof of this using the measure-theoretic definition of conditional expectation? Any help is appreciated.