In this answer we will only consider the leading semi-classical approximation of a $1$-dimensional problem with Hamiltonian
$$ H(x,p) ~=~ \frac{p^2}{2m}+ \Phi(x), $$
where $\Phi$ is a potential. Semi-classically, the number of states $N(E)$ below energy-level $E$ is given by the area of phase space that is classically accessible, divided by Planck's constant $h$,
$$ N(E) ~\approx~ \iint_{H(x,p)\leq E} \frac{dx~dp}{h}. \tag{1}$$
[Here we ignore the Maslov index, also known as the metaplectic correction, which e.g. yields the zero-point energy in the simple harmonic oscillator(SHO) spectrum.]
Let
$$ V_0~:=~ \inf_{x\in\mathbb{R}} ~\Phi(x) $$
be the infimum of the potential energy. Let
$$\ell(V)~:=~\lambda(\{x\in\mathbb{R} \mid \Phi(x) \leq V\}) $$
be the length of the classically accessible position region at potential energy-level $V$.
[Technically, the length $\ell(V)$ is the Lebesgue measure $\lambda$ of the preimage
$$\Phi^{-1}(]-\infty,V])~:=~ \{x\in\mathbb{R} \mid \Phi(x) \leq V\},$$
which does not necessarily have to be a connected interval.] Assuming that the Hamiltonian operator is bounded from below, we get that
$$ N(V_0)~=~0. $$
Example 1: If the potential $\Phi(x)=\Phi(-x)$ is an even function and is strongly monotonically increasing for $x\geq 0$, then the accessible length $\ell(V)=2\Phi^{-1}(V)$ is twice the positive inverse branch of $\Phi$.
Example 2: If the potential has a hard wall $\Phi(x)=+\infty$ for $x<0$, and is strongly monotonically increasing for $x\geq 0$, then the accessible length $\ell(V)=\Phi^{-1}(V)$ is the positive inverse branch of $\Phi$.
Example 3: If the potential $\Phi(x)$ is strongly monotonically decreasing for $x\leq0$ and strongly monotonically increasing for $x\geq 0$, then the accessible length $\ell(V)=\Phi_{+}^{-1}(V)-\Phi_{-}^{-1}(V)$ is the difference of the two inverse branch of $\Phi$.
In Example 1 and 2, if we would be able to determine the accessible length function $\ell(V)$, then we would also be able to generate the corresponding potential $\Phi(x)$ as OP asks.
The main claim is that we can reconstruct the accessible length $\ell(V)$ from $N(E)$, and vice-versa.
$$N(E) ~\approx ~\frac{\sqrt{2m}}{h} \int_{V_0}^E \frac{\ell(V)~dV}{\sqrt{E-V}},\tag{2} $$
$$ \ell(V) ~\approx ~\hbar\sqrt{\frac{2}{m}} \frac{d}{dV}\int_{V_{0}}^V \frac{N(E)~dE}{\sqrt{V-E}}.\tag{3} $$
[The $\approx$ signs are to remind us of the semi-classical approximation (1) we made.
The formulas can be written in terms of fractional derivatives as Jose Garcia points out in his answer.]
Proof of eq. (2):
$$\begin{align} h ~N(E) ~\stackrel{(1)}{\approx}~~~& 2\int_0^{\sqrt{2m(E-V_0)}} \left. \ell(V) \right|_{V=E-\frac{p^2}{2m}}~dp\cr
~\stackrel{V=E-\frac{p^2}{2m}}{=}&~2\int_{V_0}^E \frac{\ell(V)~dV}{v}\cr
~=~~~&\sqrt{2m}\int_{V_0}^E \frac{\ell(V)~dV}{\sqrt{E-V}},\end{align} $$
because $dV~=~ - v~dp$ with speed $v~:=~\frac{p}{m}~=~\sqrt{\frac{2(E-V)}{m}}$. $\Box$
Proof of eq. (3): Notice that
$$ \int_{V^{\prime}}^V \frac{dE}{\sqrt{(V-E)(E-V^{\prime})}} ~\stackrel{E=V \sin^2\theta + V^{\prime} \cos^2\theta }{=}~ 2 \int_0^{\frac{\pi}{2}} d\theta ~=~ \pi.\tag{4} $$
Then
$$\begin{align}\frac{h}{\sqrt{2m}}\int_{V_0}^V \frac{N(E)~dE}{\sqrt{V-E}} ~\stackrel{(2)}{\approx}~&
\int_{V_0}^{V}\frac{dE}{\sqrt{V-E}}\int_{V_0}^{E} \frac{\ell(V^{\prime})~dV^{\prime}}{\sqrt{E-V^{\prime}}} \cr
~\stackrel{{\rm Fubini}}{=}&~\int_{V_0}^V \ell(V^{\prime})~dV^{\prime}\int_{V^{\prime}}^V \frac{dE}{\sqrt{(V-E)(E-V^{\prime})}} \cr
~\stackrel{(4)}{=}~& \pi \int_{V_0}^V \ell(V^{\prime})~dV^{\prime},\end{align}\tag{5}$$
where we rely on Fubini's Theorem to change the order of integrations.
Finally, differentiation wrt. $V$ on both sides of eq. (5) yields eq. (3). $\Box$
Let us for completeness try to integrate by parts (IBP).
$$\begin{align}\frac{1}{\hbar}\sqrt{\frac{m}{2}}\int_{V_0}^V \ell(V^{\prime})~dV^{\prime}
~\stackrel{(3)}{\approx}~& \int_{V_0}^V \frac{N(E)~dE}{\sqrt{V-E}} \cr
~\stackrel{\text{IBP}}{=}~& 2\int_{V_0}^V \!dE~N^{\prime}(E)\sqrt{V-E},
\end{align} \tag{6}$$
so that
$$\begin{align}
\frac{1}{\hbar}\sqrt{\frac{m}{2}}\ell(V)
~\stackrel{(3)}{\approx}~& \frac{d}{dV}\int_{V_{0}}^V \frac{N(E)~dE}{\sqrt{V-E}}\cr
~\stackrel{(6)}{=}~&\int_{V_0}^V \frac{N^{\prime}(E)~dE}{\sqrt{V-E}}\cr
~\stackrel{\text{IBP}}{=}~& 2N^{\prime}(V_0)\sqrt{V-V_0} + 2\int_{V_0}^V \!dE~N^{\prime\prime}(E)\sqrt{V-E}.\tag{7}
\end{align} $$
Similarly,
$$\begin{align}
\frac{h}{\sqrt{2m}}N(E)
~\stackrel{(2)}{\approx}~& \int_{V_0}^E \frac{\ell(V)~dV}{\sqrt{E-V}} \cr
~\stackrel{\text{IBP}}{=}~& 2\ell(V_0)\sqrt{E-V_0} + 2\int_{V_0}^E\!dV~\ell^{\prime}(V)\sqrt{E-V},\tag{8}
\end{align} $$
so that
$$
\frac{h}{\sqrt{2m}}N^{\prime}(E)
~\stackrel{(8)}{\approx}~\frac{\ell(V_0)}{\sqrt{E-V_0}} + \int_{V_0}^E\!dV~\frac{\ell^{\prime}(V)}{\sqrt{E-V}}.
\tag{9} $$
For more information, see my related Phys.SE answer here.