There are other substitutions you can use to transform the equation to a normal form. For example, the equation
$$
a(x)y''(x)+b(x)y'(x)+c(x)y(x)+\lambda d(x)y(x)=0,
$$
is transformed to
$$
-\frac{d}{dx}\left(a(x)\frac{df}{dx}\right)+\left(\frac{(b-a')^2}{4a}+\frac{(b-a')'}{2}-c\right)f = \lambda d(x)f(x)
$$
by the substitution $y=\rho(x)f(x)$, where
$$
\rho(x) = \sqrt{a(x)}\exp\left(-\int\frac{b}{2a}dx\right).
$$
This substitution is far more versatile in dealing with classical equations. However, it requires $a(x)$ to be twice differentiable. The advantage is that $a(x)$ remains the coefficient of $f''$ and $d(x)$ remains the of the eigenvalue $\lambda f(x)$, which is what I believe you're after. Many classical standard forms can be derived using this substitution.
For example, the associated Legendre equation
$$
(1-x^2)u''-2x(m+1)u'+[l(l+1)-m^2-m]u=0
$$
is transformed by $u=(1-x^2)^{-m/2}f$ to the classical form
$$
-\frac{d}{dx}\left((1-x^2)\frac{df}{d}\right)+\frac{m^2}{1-x^2}f=l(l+1)f.
$$
This form is hard to get any other way.
Another use of this substitution is to transform an equation to potential form
$$
-\frac{d^2f}{dx^2}+qf = \lambda f.
$$
This requires a clever use of the above substitution, followed by a substitution of the independent variable.
ANOTHER APPROACH: Typically, the function $d$ is turned into a weight function for the inner product space when you have a form such as the one I mentioned above:
$$
-\frac{d}{dx}\left(a(x)\frac{df}{dx}\right)+\left(\frac{(b-a')^2}{4a}+\frac{(b-a')'}{2}-c\right)f = \lambda d(x)f(x)
$$
Then you can define the operator
$$
L=\frac{1}{d}\left[ -\frac{d}{dx}\left(a(x)\frac{df}{dx}\right)+\left(\frac{(b-a')^2}{4a}+\frac{(b-a')'}{2}-c\right)f \right]
$$
on the weighted $L^2$ space $L^2_{d}$ defined by
$$
\langle f,g\rangle_{L^2_{d}}=\int f(x)\overline{g(x)}d(x)dx
$$
In this setting the operator $L$ is symmetric with the right endpoint conditions:
$$
\langle Lf,g\rangle_{L^2_d}=\langle f,Lg\rangle_{L^2_d}+\mbox{evaluation terms},
$$
and the eigenvalue problem is $Lf=\lambda f$.
If you substitute $x^m$ into $x^2y''+5xy'+\lambda y=0$, you get
$$
m(m-1)+5m+\lambda = 0 \\
m^2+4m+\lambda = 0 \\
m =\frac{-4\pm\sqrt{16-4\lambda}}{2}=-2\pm\sqrt{4-\lambda}
$$
The corresponding solutions are
$$
\frac{1}{x^2}x^{\sqrt{4-\lambda}},
\frac{1}{x^2}x^{-\sqrt{4-\lambda}}.
$$
To put $x^2y''+5xy'+\lambda y=0$ into Sturm-Liouville form, multiply by $x^3$:
$$
-(x^5y')'=\lambda x^3y \\
-\frac{1}{x^3}(x^5y')'=\lambda y
$$
This problem is considered in $L^2_{x^3}(1,e^{\pi})$, where $x^3$ is the weight function for the space. The solutions of the above when $\lambda=0$ are both in $L^2_{x^3}(1,e^{\pi})$ because they are regular on $(1,e^{\pi})$. To solve the eigenvalue problem, search for $A,B$ such that
$$
y(x)=A\frac{1}{x^2}x^{\sqrt{4-\lambda}}+B\frac{1}{x^2}x^{-\sqrt{4-\lambda}}
$$
satisfies
$$
y(1)=0,\;\; y(e^{\pi})=0.
$$
The first condition is satisfied by setting $B=-A$, which gives
\begin{align}
y(x)&=\frac{A}{x^2}\left[x^{\sqrt{4-\lambda}}-x^{-\sqrt{4-\lambda}}\right] \\
&=\frac{A}{x^2}\left[e^{i\sqrt{\lambda-4}\ln x}-e^{-i\sqrt{\lambda-4}\ln x}\right] \\
&=\frac{A}{x^2}2i\sin(\sqrt{\lambda-4}\ln x)
\end{align}
The condition $y(e^{\pi})=0$ gives the eigenvalue equation
$$
\sin(\sqrt{\lambda-4}\pi)=0.
$$
Best Answer
The operator can be written as $$ Ly = \frac{1}{w}\left[-\frac{d}{dx}\left(p\frac{dy}{dx}\right)+qy\right]. $$ This operator is defined on weighted $L^2$ space $L^2_w[a,b]$. With the correct endpoint conditions, $L$ becomes selfadjoint, and the eigenvalue problem is $Ly=\lambda y$. Absording the negative sign into the second derivative term is standard because that has the best chance of making $L$ a positive operator. For example, in the simplest case of $Ly=-y''$ on $[a,b]$ with endpoint conditions at $x=a,b$, $$ \langle Ly,y\rangle = \int_a^b (-y'')y(x)dx = -y'y|_a^b + \int_a^b(y')^2dx = \int_a^b (y')^2dx \ge 0. $$