# MSE of measurable function is still conditional expectation

Motivation

Then the usual stochastic filtering problem says that: $$\operatorname{argmin}_{Z \in L^2(\mathscr{G}_t)}\,\mathbb{E}[(Y_t-Z_t)^2],$$ where $\mathscr{G}_t$ is the $\sigma$-algebra generated by $Y$ up to time $t$ is solved by $$\hat{Y}_t\triangleq \mathbb{E}[Z|\mathscr{G}_t].$$

Question:

My question is, if I fix an injective Borel-measurable $\phi:\mathbb{R}^d\mapsto \mathbb{R}^{d'}$ and let $Y_t$ be a stochastic process with values in $\mathbb{R}^d$ (say d'\geq d).

Is it still true that the minimizer of: $$\operatorname{argmin}_{Z \in L^2(\mathscr{G}_t)}\,\mathbb{E}[(\phi(Y_t)-\phi(Z_t))^2],$$ is $$\hat{Y}_t\triangleq \mathbb{E}[Z|\mathscr{G}_t]?$$

If not, what additional assumptions do I need to make, probably on $\phi$?

The time dependence is just muddying the waters. The question is really, given a $\sigma$-field $\mathcal{G}$, is $\hat{Y} = \mathbb{E}[Z \mid \mathcal{G}]$ the minimizer of $\mathbb{E}[(\phi(Y) - \phi(Z))^2]$ over $\mathcal{G}$-measurable random variables?
Clearly not. Work in $d=d'=1$, let $\mathcal{G}=\{\Omega, \emptyset\}$ be the trivial $\sigma$-field (so $\mathcal{G}$-measurable random variables are constant and conditional expectation is unconditional expectation) and let $Z$ be a coin flip that is 1 with probability $1/2$ and 0 otherwise. Take $\phi(x) = x^3$. Then $\mathbb{E}[Z \mid \mathbb{G}] = \mathbb{E}[Z] = 1/2$ but the minimizer $\hat{Y}$ is clearly $2^{-1/3}$.
It seems the answer is really $\hat{Y} = \phi^{-1}(\mathbb{E}[\phi(Z) \mid \mathcal{G}])$ and that doesn't generally simplify, except in obvious cases like when $\phi$ is linear.