An eigenfunction/eigenvalue problem involves boundary conditions, not just the ODE. The proof of orthogonality of eigenfunctions for different eigenvalues essentially relies on the boundary conditions.
Legendre's differential equation being singular at $\pm 1$, the boundary conditions are somewhat implicit: they amount to the statement that the solution $y$ must stay bounded at both endpoints. This could be recast as the Dirichlet boundary condition for the function $(1-x^2)y(x)$.
Legendre functions do not obey the aforementioned boundary condition: they blow up at the endpoints, as the linked article shows.