How can one make sense of the idea of extremizing a Hamilton-Jacobi equation?
In Schrödinger's paper "Quantisation as a Problem of Proper Values I" (Annalen der Physik (4), vol. 79, 1926, p. 1, available e.g. in Collected papers on wave mechanics, AMS publishing) he begins with the classical time-independent Hamilton-Jacobi equation
$$H(q,\frac{\partial S}{\partial q}) = E$$
and instead of assuming an additive solution for separation of variables he assumes a multiplicative solution thus defining $S = K\ln(\psi)$ to get
$$H(q,\frac{K}{\psi} \frac{\partial \psi}{\partial q}) = E.$$
Instead of solving it he talks about how this last equation "can always be transformed so as to become a quadratic form (of $\psi$ & its first derivatives) equated to zero", neglecting the relativistic variation of mass.
(I'm assuming that transforming this to a quadratic form means a Taylor expansion in powers of $\psi$, though I'm not sure about that).
Then he seeks "a function $\psi$, such that for any arbitrary variation of it the integral of the said quadratic form, taken over the whole of coordinate space (I am aware this formulation is not entirely unambiguous), is stationary, $\psi$ being everywhere real, single-valued, finite, and continuously differentiable up to the second order."
In other words, he basically extremizes
$$I = \iiint\left(\frac{K^2}{2m}\left[\left(\frac{\partial \psi}{\partial x}\right)^2 \ + \ \left(\frac{\partial \psi}{\partial y}\right)^2 \ + \ \left(\frac{\partial \psi}{\partial z}\right)^2\right] + (V - E)\psi^2\right)\,\mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z$$
and ends up with the time independent Schrödinger equation, but the issue is extremizing the Hamilton-Jacobi equation. Where is the justification for this?
I can only find a reference to it here (in the ps.gz link), so it does seem to be something more than one person has done, but what is the theory behind this? Does it function as another method of solving Hamilton's equations? If so, why?