If we make the substitution of variables by $z=\ln(x)$ in $$x^2M''+xM'+\lambda M=0$$ then we will get $$M''(z)=-\lambda M(z)$$ We can consider different cases for $\lambda$:
Case 1: $\lambda>0$
Solving and applying the boundary conditions, we get that no eigenfunctions exist in this case.
Case 2: $\lambda < 0$
Same as in Case 1.
Case 3: $\lambda = 0$
We get the constant function $M(x) = c_2$. But if we check the orthogonality condition (the weight function in this case is $\rho(x) = \frac{1}{x}$), we will not get $0$.
Where am I mistaken? I'd appreciate a clarification.