Can we reconstruct a DE from its general solution? If we think of a differential equation as being a 'problem' and the set of all solutions to the DE as being the 'general solution,' then my question is this:
Question:
Under what circumstances can we reconstruct the problem from the general solution?

Lets make that more precise.
Definition 1. Whenever $X$ is a subset of $\mathbb{R}$ and $f : \mathbb{R}^n \times X \rightarrow \mathbb{R}$ a function, define that $S(f)$ is the set of all solutions $y : X \rightarrow \mathbb{R}$ to the ODE
$$y^{(n)}(x) = f(y^{(n-1)}(x),\cdots,y^{(0)}(x),x),\quad x \in X.$$
We can think of $f$ as the 'problem' and $S(f)$ as the 'general solution.'
Question:
What conditions need to be added to $f$ and/or $X$ in the above definition to guarantee that the solution function $S$ is an injection? (That is, one-to-one).
Remark. This is still a rather imprecise way of formulating the question, and any suggestions for making it better would be appreciated. Please leave a comment!

The following is an attempt to use Lie's symmetry method in reverse. I have no idea if it works in general, or if the DE you get is unique.
Suppose you have $y = g(x;\theta_1, \theta_2, \theta_3, ..., \theta_n)$, where each $\theta_i$ is a constant of integration parametrizing the solution. Find $y_{\theta_1}$
We want to find a change of coordinates $y\rightarrow h(y,x) = u$ such that $u_{\theta_1}=1$. If we can do this, then we can use our solution to write $u$ as a function of $x$ and the various constants of integration. However, since $u_{\theta_1}=1$, we expect that $u$ will take the form $u = g_2(x;\theta_2,\theta_3,...,\theta_n)+\theta_1$. We will then take the derivative w.r.t. $x$ to eliminate the $\theta_1$ dependence. This will be done recursively until all constants of integration are eliminated.
$$
u_{\theta_1} = h_yy_{\theta_1} = 1\\
h_y = y_{\theta_1}^{-1}
$$
Let's try an example. $y = \theta_2\ln(x)+\theta_1+\frac{x^2}{4}$
Notice, we already have something of the form $g(x;\theta_2,\theta_3,...,\theta_n)+\theta_1$, so we can skip the first step (i.e. finding a suitable coordinate change) and just differentiate.
$$y' = y_1 = \frac{\theta_2}{x}+\frac{x}{2}$$
Now we apply the method outlined above.
$$\frac{\partial y_1}{\partial \theta_2} = \frac{1}{x} \implies h_{y_1} = x \implies h(x,y_1) = xy_1
$$
Note, this $h$ is not uniquely defined. Using this $h$, we let $ y_1 = \frac{u}{x}$. The DE becomes
$$u = \frac{1}{2}x^2+\theta_2 \implies u' = x$$
Back-substitute.
$$
\frac{dy_1}{dx} = \frac{u'}{x}-\frac{u}{x^2} = 1 - \frac{y_1}{x}
$$
And $y_1=y'$, so we obtain
$$
y'' = 1-\frac{y'}{x}$$
This fits the original solution.
