Suppose I have a random variable $y\in\mathbb{R}$, and I can write the conditional expectation of $y$ on another random variable $x$, $E[y|x]$.
Question 1: If I had to choose a function $g:\mathbb{R}\to\mathbb{R}$ so that $E[g(y)|x]$ is invertible in $x$, which properties or form should $g$ have? Question 2: More specifically, is it "weakly better" to choose an invertible function vs a non-invertible function $g$?
On the first question, I doubt there is a closed form answer, but I don't really know how to start addressing it. On the second question, in two special cases the conjecture is true:
If $x=y$, then $E[g(y)|x]=g(x)$, hence $E[g(y)|x]$ is invertible in $x$ if and only if $g$ is invertible on the support of $y$.
Suppose $y|x$ first order stochastic dominates $y|x'$ for any $x>x'$, then $E[y|x]$ is invertible in $x$ (as "better" $x$ in a FOSD sense have a larger conditional expectation). And a strictly increasing $g$ (a specific form of invertibility) preserves this invertibility: $E[g(y)|x]>E[g(y)|x']$ whenever $x$ FOSD $x'$.
But what about the general case? For question 2, in general, one would have to show that whenever $E[g(y)|x]=\int g(y) f(y|x) dy$ (where $f$ is the density) is invertible in $x$ for a non-invertible function $g$, then it should also be invertible for an invertible function $g$ (or find a counterexample). And I have no idea which approach to take.
My above comments show it is sometimes better to use non-invertible $g$ functions. Here I treat a portion of the question 1.
Consider the discrete case $X \in \{x_1, x_2, ..., x_n\}$ where $x_i$ are distinct and $P[X=x_i]>0$ for all $i \in \{1, ..., n\}$. Invertibility of $E[g(Y)|X=x_i]$ requires the conditional CDF function $F_i(y) = P[Y\leq y|X=x_i]$ to be distinct for all $i \in \{1, ..., n\}$. Indeed, if there are two indices $i \neq j$ such that $F_i(y)=F_j(y)$ for all $y \in \mathbb{R}$, then we could not distinguish $E[g(Y)|X=x_i]$ from $E[g(Y)|X=x_j]$, regardless of the function $g$.
Now suppose the CDF functions $F_i(y)$ are all distinct and for simplicity assume they have (distinct) PDFs $f_i(y)$. We want to construct a function $g(Y)$ such that $E[g(Y)|X=x_i] = \int g(y) f_i(y)dy$ is distinct for all $i \in \{1, ..., n\}$. Does such a $g(Y)$ always exist?
There are many approaches. One way is to assume the densities $f_i(y)$ are square integrable and then represent each function $f_i(y)$ as a sum of $k$ orthonormal basis functions $\{b_1(y), ..., b_k(y)\}$ (where $k \leq n$):
$$f_i(y) = \sum_{j=1}^k a_{ij} b_j(y) \quad, \forall i \in \{1, ..., n\} $$ The basis functions can be found, for example, by the Gram-Schmidt procedure. Now define $g(y) =\sum_{m=1}^k \theta_m b_m(y)$. Then: $$ \int g(y) f_i(y)dy = \sum_{j=1}^k \theta_j a_{ij} \quad, \forall i \in \{1, ..., n\} $$ Define the $n\times k$ matrix $A = (a_{ij})$. Then $A$ has distinct rows (since the $f_i(y)$ functions are distinct for each row $i$). Define $\theta$ as the column vector $(\theta_1, ..., \theta_k)$. Define $c_i = \int g(y) f_i(y)dy$ for all $i \in \{1, ..., n\}$ and define $c$ as the column vector $(c_1, ..., c_n)$. Then: $$ A\theta = c$$ The question reduces to this: If a matrix $A$ has distinct rows, is it always possible to find a vector $\theta$ such that $A\theta$ has distinct entries? The answer is "yes." In fact we can choose $\theta$ randomly with iid coefficients in the interval $[0,1]$ and the probability that this random selection works is 1.
Alternatively: Define the matrix $D=(d_{ij})$ with $d_{ij}=\int_{-\infty}^{\infty} f_i(y)f_j(y)dy$. Let $\theta = (\theta_1, \ldots, \theta_n)$ be a vector (to be chosen later) and define $g(y) = \sum_{j=1}^n \theta_j f_j(y)$. Notice that for each $i \in \{1, ..., n\}$, the value $\int_{-\infty}^{\infty} g(y)f_i(y)dy$ is the $i$th row of $D\theta$.
1) If the $D$ matrix has distinct rows, you can randomly choose $\theta$ with entries i.i.d. in $[0,1]$ and the probability that $D\theta$ has distinct rows is 1.
2) If the $D$ matrix is invertible, then you can choose $c \in \mathbb{R}^n$ as any vector with distinct entries and choose $\theta = D^{-1}c$.