I am trying to prove that statement :
$$(X,Z) \overset{d}{\sim} (Y,Z) \implies \mathbb E [ f(X) | Z ] = \mathbb E [ f(Y) | Z ].$$
First I know that $ (X,Z) \overset{d}{\sim} (Y,Z) \implies (X) \overset{d}{\sim} (Y) $. Thus I indeed have
$$\mathbb E f(X) = \mathbb E f(Y) $$
but I don't think this would be true when one changes the measure of the expectation. I don't know how to use the hypothesis that the joint distributions are equal (thus using the conditions on $Z$).
If $V$ is a random variable $V$ such that $\mathbb E\left[V\mathbf{1}_A\right]=0$ for each $A$ in a $\sigma$-algebra $\mathcal A$, then $\mathbb E\left[V\mid \mathcal A\right]=0$. Apply this to $\mathcal A=\sigma(Z)$ and $V=f(X)-f(Y)$: a set in $\mathcal A$ has the form $Z^{-1}(B)$ for a Borel set $B$ and $$ \mathbb E\left[f(X)\mathbf 1_{Z^{-1}(B)}\right]= \mathbb E\left[f(X)\mathbf 1_{Z\in B}\right]= \mathbb E\left[f(Y)\mathbf 1_{Z\in B}\right]. $$