The one-dimensional quantum HO can be solved in Schrodinger representation by getting Hermite Differential Equation
$$ \frac{d^2y}{dx^2} - 2x \frac{dy}{dx} + \lambda y = 0 $$ with solutions $$ y(x) = \mathcal{H_n(x)} $$ which is true for integer values of $\lambda$. In the case of non-integer values of $\lambda$ the solutions are given by hyper-geometric functions
$$ y(x) = c_1 H_{\frac{\lambda }{2}}(x)+c_2 \, _1F_1\left(-\frac{\lambda }{4};\frac{1}{2};x^2\right) $$ and it seems like these functions are not square integrable and hence not valid/physically acceptable wavefunctions.
In this perspective, I tend to understand that quantisation comes up only as a feature of restricting the solutions to integer values, which alone are square integrable.
I am looking forward to explanations concerning this aspect, since there are so many cases where the polynomial solutions occur (which are solutions for some integer value of the eigen-value in differential equation). (For instance, the solutions of Hydrogen atom).
PS : In the case of infinite square well potential, the quantisation of the energy seems to come from the boundary conditions. So what is an analogy to that in the case of Harmonic Oscillator and Hydrogen atoms cases.