As you rightly point out, the goal is to identify a function $f$ such that the identity
$$
\iint g(xy)x\mathbf 1_{0\leqslant x,y\leqslant 1}\mathrm dx\mathrm dy=\iint g(xy)f(xy)\mathbf 1_{0\leqslant x,y\leqslant 1}\mathrm dx\mathrm dy,
$$
holds for every (bounded measurable) function $g$.
Hint: Both sides are linear functionals of $g$, hence they are integrals of $g$ with respect to some measures. Equate those measures.
Concretely, this means using some change of variables to reach integrals of $g$. Here the change of variables $(x,y)\to(z,t)=(xy,x)$ seems a good idea. One gets $\mathrm dz\mathrm dt=x\mathrm dx\mathrm dy$, hence
$$
\mathrm{LHS}=\iint g(z)\mathbf 1_{0\leqslant z\leqslant t\leqslant 1}\mathrm dz\mathrm dt,
$$
and
$$
\mathrm{RHS}=\iint g(z)f(z)\mathbf 1_{0\leqslant z\leqslant t\leqslant 1}\mathrm dz\mathrm dt/t.
$$
Thus, $\mathrm{LHS}=\mathrm{RHS}$ for every (bounded measurable) function $g$ if and only if (almost everywhere)
$$
f(z)\int\mathbf 1_{0\leqslant z\leqslant t\leqslant 1}\mathrm dt/t=\int\mathbf 1_{0\leqslant z\leqslant t\leqslant 1}\mathrm dt,
$$
that is,
$$
f(z)\mathbf 1_{0\leqslant z\leqslant 1}(-\log z)=\mathbf 1_{0\leqslant z\leqslant 1}(1-z).
$$
To sum up, $f(z)$ is undefined when $z\lt0$ or $z\geqslant1$ (as was to be expected), and, if $0\leqslant z\lt 1$, $f(z)$ must make true (almost everywhere) the identity above. An example of such a function $f$ is
$$
f(z)=\mathbf 1_{0\lt z\lt 1}(1-z)/(-\log z),
$$
hence
$$
\mathbb E(U\mid UV)=f(UV)=(1-UV)/(-\log UV).
$$
Note that while the function $f$ is not unique, even almost everywhere, since, for example, $f(z)$ for $z\lt0$ can be anything one wants, the random variable $f(UV)$ is unique almost surely.
Sanity checks: $\mathbb E(U\mid UV)\geqslant UV$ (why?) and $f(z)\to1$ when $z\to1$, $z\lt1$ (why?).