I'm looking for an example of some random variable $X$ and a sigma-algebra $\mathcal F$ such that $E(X)<\infty$ and $E(E(X|\mathcal F)^2)=\infty$, with the requirement that $E(X|\mathcal F) \neq X$ a.s
A natural way would be to look for $X$ and $Y$ such that $E(X)<\infty$, $E(Y)<\infty$, $E(X^2)=E(Y^2)=\infty$ and $E(X|Y)=a Y + b$. I can't come up with such $X$ and $Y$ off the top of my head ...
Let Y and Z be i.i.d with mean 0 and infinite variance. Let X=Y+Z. Then E(X|Y)=Y because EZ|Y)=EZ=0. Of course $EX^2$=$\infty$