It is relatively easy to show that $X$ must be a function of $X_1,X_2$. One just need to verify that $X$ must be constant on any level set $\{\omega|(X_1(\omega),X_2(\omega))=(a,b)\}$.
It would be nice if something can be said about the function. Measurability looks like the weakest requirement.
However, it seems that nothing prevents the preimage $f^{-1}(B)$ of a Borel set $B$ is non-measurable in $\mathbb{R}^2$ but $(X_1,X_2)^{-1}\circ f^{-1}(B)$ is measurable. Afterall, nothing is said about the measurability of the preimage of a non-measurable set.
So could we conclude that $f$ must be measurable? And how?