Why do we only have one set of solutions for the PDEs of Legendre and Hermite polynomials?

This is an undergraduate-level mathematical physics problem. It may be trivial and basic to some of you, but it's important to me.

In the mathematical physics course, the PDE for Hermite polynomials is $$H^{\prime\prime}(x)-2xH^\prime(x)+2nH(x)=0.$$ The PDE for Legendre polynomials is $$\frac{d}{d x}(1-x^2)\frac{d}{d x}P_l(x)+l(l+1)P_l(x)=0.$$ But I know there's a theorem stating that for $$n$$-th order differential equation, we should get two linearly independent solutions, if zero boundary is imposed. Therefore I should expect another class of Hermite (Legendre) polynomials.

But here, I don't see there's any boundary condition, both for Hermite and Legendre (both my professor and the textbook didn't mention B.C.).

So I want to know if there's some implicit boundary conditions imposed here for these two kinds of partial differential equations. If so, what are they? Or did I misused the theorem mentioned above?

Please feel free to answer or to comment. Thank you in advance!

The Hermite equation arises from the one-dimensional Quantum Harmonic Oscillator, and may be transformed by scaling the independent variable into the form: $$y''-2xy'+\lambda y= 0.$$ There are no endpoint conditions because the problem is posed on the entire real line. However, there are conditions at infinity implicitly imposed by requiring that the solution be square integrable on $$\mathbb{R}$$. It turns out that the square-integrable solutions have the form $$e^{-x^2/2}p_n(x)$$, where $$p_n$$ is a polynomial. There are other solutions, but none others that are square integrable.
The equation for the Hermite functions is transformed to an ODE for the Hermite polynomials $$p_n$$ by the substitution $$y=e^{-x^2/2}p(x)$$. This leads to the new equation for $$p$$ given by
$$-y''+x^2y = (\lambda+1)y.$$
The Legendre equation is different. This equation is posed on $$[-1,1]$$. This equation has more than one $$L^2[-1,1]$$ solution, but the classical solutions are all bounded near the endpoints. It turns out that imposing boundedness is the same as requiring that a linear boundary functional vanish on the chosen solutions. This is rarely addressed in full detail in either Math or Physics. The solutions of
$$((1-x^2)y')' = 0$$ have the form $$y=A+B\ln\left|\frac{1-x}{1+x}\right|$$ All such solutions are square-integrable on $$[-1,1]$$, but only one is bounded. The eigenvalues for the classical problem are the only values of $$\lambda$$ for which bounded solutions exist. For such eigenvalues, all eigenfunctions are in $$L^2[-1,1]$$, but only one non-trivial bounded solution exists (up to a non-zero constant multipier.)