Suppose I have two non-negative r.v.s $X,Y \geq 1$ and I know $\mathbb{E}(X^2 | Y) = (Y-1) ^ 2$.
Does this mean $\mathbb{E}(X | Y) = Y - 1$?
Cause, if i recall right the intro to probability, I have $\mathbb{E}(X^2 | Y = y) = (y - 1)^2$, so it obvious that $\mathbb{E}(X | Y = y) = y - 1$ for all $y$. But then I saw that conditional expectation is actually a function - projection to some space etc. and now this doesn't seem obvious at all.
No.
Let it be that $Z$ is a random variable with $Z>0.5$, $\mathbb EZ^2=1$ and $0<\mathbb EZ<1$. Further let it be that $Y$ and $Z$ are independent and $Y>3$.
Then for $X=(Y-1)Z>1$ and we find: $$\mathbb E[X^2\mid Y]=\mathbb E[(Y-1)^2Z^2\mid Y]=(Y-1)^2\mathbb EZ^2=(Y-1)^2$$ and:$$\mathbb E[X\mid Y]=\mathbb E[(Y-1)Z\mid Y]=(Y-1)\mathbb EZ<(Y-1)$$