How to do quantum mechanics if the Schrödinger equation was a Sturm-Liouville equation? Let us replace the time-independent Schrödinger equation by a Sturm-Liouville equation. For simplicity1 let us set $p(x)=1$ and let us also assume that the problem is regular. Our new Schrödinger-like equation in the position representation would then look like this
$$ -\frac{d^2}{dx^2} \psi_n(x)+ V(x)\psi_n(x) = E_n w(x)\psi_n(x).$$
I chose the notation to keep it as close as possible to the Schrödinger equation, only left out some $\hbar$s and $m$s. So $E$ is the energy, $V(x)$ is a potential, $\psi(x)$ is the wavefunction, the subscript $n$ labels an eigenstate and $w(x)$ is some weird term that is usually not in the Schrödinger equation.
As far as I can tell one can still do a kind of quantum mechanics with this, all the postulates of quantum mechanics seem to be possible to fulfill. But the Hilbert space for this equation requires a different inner product in the position representation, since now
$$\int dx ~ w(x)\psi^*_n(x) \psi_m(x) = \delta_{mn}$$
instead of the usual
$$\int dx ~ \psi^*_n(x) \psi_m(x) = \delta_{mn}.$$
Question
I am having trouble figuring out what exactly stays the same and what changes with this modified inner product when we use Dirac notation. In particular

*

*Can one write the equation in operator form?

$$\hat{L} |\psi_n\rangle = E_n |\psi_n\rangle $$

*

*Related to the above what would $\langle r'|\hat{L} |r\rangle$ and $\langle r |\psi\rangle$ be?

*Is $\sum_n |\psi_n\rangle \langle \psi_n | = 1$ still true?

*Is $\langle r' |r\rangle = \delta(r-r')$ still true?


1In my point of view changing $p(x)$ is a bit boring, because the inner product in the position representation does not change. Feel free to comment on that if there is anything interesting that I missed.
 A: Nowhere in the actual formalism of QM is it necessary that the inner product be the familiar unweighted one given by
$$\langle f,g\rangle = \int_a^b  \overline{f(x)}g(x) dx$$
In particular, the definitions of Hermiticity and self-adjointness remain the same.  If the system is in some state $\psi$, the  probability of measuring some observable $A$ to be in some (Borel) set $E\subseteq \mathbb R$ is given by
$$\operatorname{Prob}_A(E,\psi) = \frac{\Vert \Pi_A(E) \psi\Vert^2}{\Vert \psi\Vert^2}$$
where $\Pi_A(E)$ is the projection onto the relevant spectral subspace and $\Vert \psi\Vert^2 = \langle \psi,\psi\rangle$.

For example, if we're thinking about the position operator $X$, then the projector $\Pi_X(E)$ eats a wavefunction $\psi$ and spits out $\chi_E\cdot \psi$, where $\chi_E(x) = \cases{ 1 & $x\in E$\\0 & else}$ is the indicator function on $E$.  As a result, the probability that the particle is in e.g. the interval $[0,1]$ is
$$\operatorname{Prob}_X([0,1],\psi) = \frac{\Vert \chi_{[0,1]}\psi\Vert^2}{\Vert \psi\Vert^2}= \int_0^1 w(x) \overline{\psi(x)}\psi(x)  dx$$
assuming that $\psi$ is normalized.
If instead we are interested in an operator $L$ with a discrete spectrum, then it will have an orthonormal eigenbasis $\{\phi_n\}$ where orthonormality is once again defined via the weighted inner product, and so everything proceeds as usual from there.

To directly address your questions,

Can one write the equation in operator form?
$$\hat L |\psi_n\rangle = E_n|\psi_n\rangle$$

Yes, this has nothing to do with the inner product.

Is $\mathbb I = \sum_n |\psi_n\rangle\langle \psi_n|$ still true?

Since the eigenstates of a self-adjoint operator $|\psi_n\rangle$ can be orthonormalized (with respect to the weighted inner product), then this remains true.

Related to the above what would $\langle r'|\hat L|r\rangle$ and $\langle r|\psi\rangle$ be? Is $\langle r|r'\rangle=\delta(r-r')$ still true?

This ultimately comes down to how we'd like to scale $|x\rangle$.  Since these "states" cannot actually be normalized, we have to choose the form we'd like the so-called resolution of the identity to take.
Convention 1: $\mathbb I = \int |x\rangle\langle x| dx$
Since $\mathbb I^2 = \mathbb I$, this convention would dictate that $\langle x|x'\rangle = \delta(x-x')$, since
$$\mathbb I^2 = \int dx \int dx' |x\rangle\langle x|x'\rangle\langle x'|$$
From there, we would have
$$|\psi\rangle = \int |x\rangle \langle x|\psi\rangle dx$$
$$\implies \Vert \psi\Vert^2 = \langle \psi|\psi\rangle = \int dx\int dx' \ \langle \psi|x'\rangle\langle x|\psi\rangle\langle x'|x\rangle$$
$$ = \int dx |\langle x|\psi\rangle |^2 = \int w(x)\overline{\psi(x)}\psi(x) \ dx$$
$$\implies \langle x|\psi\rangle = \sqrt{w(x)} \psi(x)$$
Furthermore, the action of $L$ in the position basis would be
$$\int dx\int dx' |x\rangle\langle x|L|x'\rangle\langle x'|\psi\rangle $$
$$\implies \langle x'|L|x\rangle = -\frac{1}{w(x)}\left( \frac{d^2}{dx^2} - V(x)\right)\frac{1}{\sqrt{w(x)}}\delta(x-x')$$
which is chosen to give the result
$$ [\ldots] = \int dx | x\rangle \frac{-1}{w(x)}\left(\frac{d^2}{dx^2} - V(x)\right) \psi(x)$$
Convention 2: $\mathbb I = \int dx\ w(x) |x\rangle\langle x|$
Enforcing $\mathbb I^2 = \mathbb I$ yields the result that $\langle x'|x\rangle = \frac{1}{w(x)}\delta(x-x')$.  Inserting the identity operator into $\langle \psi|\psi\rangle$ then gives that $\langle x|\psi\rangle = \psi(x)$, as usual.  Lastly, requiring that
$$\int dx\int dx' \ w(x)|x\rangle\langle x|L|x'\rangle w(x')\langle x'|\psi(x)\rangle = \int dx |x\rangle \frac{-1}{w(x)}\left(\frac{d^2}{dx^2} - V(x)\right) \psi(x)$$
yields the result
$$\langle x|L|x'\rangle = -\frac{1}{w(x)^2} \left(\frac{d^2}{dx^2}-V(x)\right) \frac{1}{w(x)}\delta(x-x')$$
You could imagine different conventions, of course.  I'd also like to emphasize again that none of this is physically meaningful, in the sense that it all comes down to how you'd like to normalize $|x\rangle$ to make your life most convenient.
A: First of all, I think there is a simple finite-dimensional analog of this problem. One can try to answer all the same questions for the following "Schrodinger equation":
$$
\left(
\begin{array}{cc}
a & b \\
b^* & c\\
\end{array}
\right)
\left(
\begin{array}{c}
\psi_1\\
\psi_2
\end{array}\right) = E 
\left(
\begin{array}{c}
w_1\psi_1\\
w_2\psi_2
\end{array}\right) = E
\left(
\begin{array}{cc}
w_1 & 0 \\
0 & w_2\\
\end{array}
\right)
\left(\begin{array}{c}
\psi_1\\
\psi_2
\end{array}\right)
$$
For the continuous case, I propose the following.

*

*We imply that there is correspondence between ket-vectors $|\psi\rangle$ and functions $\psi(x)$. We also suppose that following relations hold
$$
\langle\psi_1|\psi\rangle = \int w(x)\psi_1^*(x)\psi(x)\ dx, \quad \int |x\rangle \langle x|\ dx = \hat{I}, \quad \langle\psi_1|\psi\rangle = \int \langle\psi_1|x\rangle \langle x|\psi\rangle \ dx
$$
In my opinion this just means, that
$$
\langle x|\psi\rangle = \sqrt{w(x)}\psi(x),\quad \langle\psi_1|x\rangle = \sqrt{w(x)}\psi_1^*(x).
$$


*Vectors $|x\rangle$ are orthonormal basis in the space of ket-vectors. Id est $\langle x|x_1 \rangle = \delta(x-x_1)$. (The question about continuous spectrum basis is delicate. I will not discuss it here.) This is required if we want the following relations to be true
$$
|\psi\rangle = \hat{I}|\psi\rangle = \int |x\rangle\langle x|\psi\rangle dx.
$$


*The Schrodinger equation can be written in the form
$$
\hat{L}|\psi_n\rangle = E_n|\psi_n\rangle,
$$
where $\hat{L}$ has following matrix representation
$$
\langle x|\hat{L}| x_1\rangle = \frac1{\sqrt{w(x)}}\left(-\frac{d^2}{dx^2} + V(x) \right)
\frac1{\sqrt{w(x)}} \delta(x-x_1) .
$$


*As $|\psi_n\rangle$ are eigenvectors of the hermitian operator $\hat{L}$ the following relation is true:
$$
\sum_n |\psi_n\rangle\langle \psi_n| = \hat{I}.
$$
A coordinate analog of the last equation is
$$
\sum_n \sqrt{w(x_1)w(x)}\psi_n^*(x_1) \psi_n(x) = \delta(x-x_1).
$$
A: The time-independent Schrödinger equation:

The Sturm-Liouville equation (see here):

If you put $p(x)=1$ and $y=y(x)$, this reduces to:
$$\frac{d^2y}{dx^2} +q(x)y(x)=-\lambda\omega (x)y(x).$$
So if we put $y=\psi_n(x)$, $q(x)=V(x)$, and $\lambda=E_n$, we get:
$$-[\frac{d^2 \psi_n(x)}{dx^2} +V(x)\psi_n (x)]={\lambda}_n {\omega}{_n} (x)\psi_n(x),$$
setting the mass $m$ nda Planck's constant $\hbar$ equal to one. The equation can be rewritten:
$$-[\frac{d^2}{dx^2} +V(x)]\psi_n (x)={\lambda}_n {\omega}_n (x)\psi_n(x)$$
So the operator, $\hat{L}$ on the left is:
$$\hat{L}=-(\frac{d^2}{dx^2} +V(x))$$
So,
$$\langle r'|\hat{L} |r\rangle$$,
the matrix element of $\hat{L}$ between $r'$ and $r$, will translate in ($dx=dr$ in one dimension):
$$\int_{r'}^{r} [-(\frac{d^2}{dr^2} +V(r)]\omega(r)\psi(r) \omega(r) ^*\psi(r)^{*}dr,$$
if the eigenvalues ${\lambda}_n$ (like the eigenvalues of $x$) are forming a continuous spectrum.
By the same token $\langle r |\psi\rangle$ (the projection of $\omega(r)\psi(r)$ on a position eiegenstate $\delta(r)$, the delta distribution, will translate in:
$$\int_{-\infty}^{\infty} \delta (r-r')\omega(r)\psi(r)dr$$

Is $\sum_n |\psi_n\rangle \langle \psi_n | = 1$ still true?

For the continuous case of the position, this translates in:
$$\int_{-\infty}^{\infty}\omega  (r) \psi  (r)\omega ^* (r) \psi ^* (r) dr,$$
which is the integral of the (complex) weights squared, and thus has to be equal to one.

Is $\langle r' |r\rangle = \delta(r-r')$ still true?

I'll leave that for you. The expression is equal to $\int_{-\infty}^{\infty}\delta(r'-r)\delta (r-r')dr$.
To ask more than one question in one question (hence the long answers) is not forbidden, even if these questions are "in the light of" but it's not recommended.
