Adjoints of closed densely-defined linear operators on a Hilbert space $X$ are nice, once you get used to working in the graph space. In fact, the proofs are easier using these techniques for general closed densely-defined operators than the special-case proofs offered for the bounded case. John von Neumann introduced this way of working with densely-defined linear operators on a Hilbert space $X$. I'll explain his approach.
A Graph: The first thing to observe is that a subspace $\mathcal{M}\subseteq X\times X$ is the graph $\mathcal{G}(L)=\{ \langle x, Lx\rangle : x\in\mathcal{D}(L)\}$ of a linear operator $L : \mathcal{D}(L)\subseteq X\rightarrow X$ iff $\langle 0,y\rangle \in \mathcal{M}$ implies $y=0$. And $L$ is a closed linear operator iff its graph is a closed in the product space $X\times X$. If the subspace $\mathcal{M}$ is a graph, then the domain of $L$ becomes the set of all first coordinates in the subspace $\mathcal{M}$. It is easy to show that this unique correspondence between $x \in \mathcal{D}(L)$ and the second coordinate is linear because $\mathcal{M}$ is linear.
Closable: A linear operator $L : \mathcal{D}(L)\subseteq X\rightarrow X$ is closable iff the closure $\mathcal{G}(L)^{c}$ in $X\times X$ of its graph $\mathcal{G}(L)$ is a graph. Equivalently, if $\{ x_{n} \}\subseteq \mathcal{D}(L)$ converges to $0$ and $\{ Ax_{n} \}$ converges to some $y$, then $y=0$. That's the condition for a linear operator to have a closed extension, and is equivalent to the requirement that the closure of the graph of $L$ be the graph of a linear operator.
Inverses: If $L$ is a linear operator, then $L^{-1}$ exists iff the transpose of the graph of $L$ is a graph. Using the transpose map $\tau\langle x,y\rangle = \langle y,x\rangle$,
$$
\tau \mathcal{G}(L)=\mathcal{G}(L^{-1}),
$$
provided both exist. Notice that if $L^{-1}$ exists, then $L^{-1}$ is closed iff $L$ is closed because $\tau$ is a unitary map on $X\times X$ with $\tau^{2}=I$.
Adjoints: The real power of using graphs comes in defining the adjoint. If $L$ is a closed densely-defined linear operator, then $L$ has a closed densely-defined adjoint $L^{\star}$ whose graph is
$$
\mathcal{G}(L^{\star})=J[\mathcal{G}(L)^{\perp}],
$$
where the orthogonal complement is taken in $X\times X$ and $J$ is the unitary symplectic transpose
$$
J\langle x, y\rangle = \langle y, -x\rangle.
$$
Notice that $J^{2}=-I$. Because $\tau$ and $J$ are unitary, they commute with the action of taking orthogonal complement. So you may also write
$$
\mathcal{G}(L^{\star})=J[\mathcal{G}(L)^{\perp}]=[J\mathcal{G}(L)]^{\perp}.
$$
Of course the transpose operator $\tau$ also commutes with the action of taking the orthogonal complement.
Commutativity: Also note that $\tau J = - J\tau$, which means $\tau J\mathcal{M}=J\tau\mathcal{M}$ for subspaces $\mathcal{M}$ of $X\times X$. So, when you are considering the action of $J$, $\tau$ and $\perp$ on subspaces $\mathcal{M}\subseteq X\times X$, you can freely interchange these operations. That makes life very simple.
Your Example: Suppose that $L$ is a closed densely defined linear operator with a densely-defined inverse $L^{-1}$. Automatically $L^{-1}$ is closed because $L$ is closed (their graphs are transposes of each other.) That means that $L^{-1}$ will have a closed densely-defined adjoint $(L^{-1})^{\star}$. As you might guess, $(L^{-1})^{\star}=(L^{\star})^{-1}$.
To show $(L^{-1})^{\star}=(L^{\star})^{-1}$: First, you must show that $L^{\star}$ has an inverse, which comes down to showing $\tau\mathcal{G}(L^{\star})$ is a graph:
$$
\tau\mathcal{G}(L^{\star})=\tau[J\mathcal{G}(L)^{\perp}]=
[J\tau\mathcal{G}(L)]^{\perp}=
[J\mathcal{G}(L^{-1})]^{\perp}=\mathcal{G}((L^{-1})^{\star}).
$$
Obviously the subspace on the far right is a graph. So $L^{\star}$ has an inverse and $(L^{\star})^{-1}=(L^{-1})^{\star}$. This proves the following:
Lemma: Let $H$ be a Hilbert space and $L$ a densely-defined closed linear operator on $H$. If $L$ has a densely-defined inverse $L^{-1}$, then $L^{\star}$ has a densely-defined inverse, and $(L^{\star})^{-1}=(L^{-1})^{\star}$.
Note: If $L^{-1}$ is defined everywhere then it is bounded by the closed graph theorem. In that case $(L^{\star})^{-1}$ is also defined everywhere and is bounded because of the graph equation stated in the lemma. This is the case in your problem for $L=U-\lambda I$ because resolvents are, by definition, defined everywhere and are bounded.
Added in Response to your Addition: Another big fact. If $A$ is closed and densely-defined then $A^{\star\star}=A$. This is because $(\mathcal{M}^{\perp})^{\perp}=\mathcal{M}$ for a closed subspace of a Hilbert space such as $H\times H$. This extends the previous lemma.
Lemma: Let $L$ be a closed densely-defined linear operator on a Hilbert space $H$ with adjoint $L^{\star}$. Then $L^{-1}$ exists as a densely-defined linear operator iff $(L^{\star})^{-1}$ exists as a densely-defined linear operator and, in either case, $(L^{-1})^{\star}=(L^{\star})^{-1}$.
Proof: I showed you that if $L$ has a densely-defined inverse, then $L^{\star}$ has a densely defined inverse and $(L^{-1})^{\star}=(L^{\star})^{-1}$. Conversely, if $L^{\star}$ has a densely-defined inverse, then $(L^{\star})^{\star}=L$ has a densely-defined inverse and $((L^{\star})^{-1})^{\star}=L^{-1} \implies (L^{\star})^{-1}=(L^{-1})^{\star}$. $\;\;\Box$
As a corollary: If $L$ is a closed densely-defined linear operator on a Hilbert space, then $L-\lambda I$ has a densely-defined inverse iff $L^{\star}-\overline{\lambda}I$ has a densely-defined inverse and, in either case,
$$
((L-\lambda I)^{-1})^{\star}=(L^{\star}-\overline{\lambda}I)^{-1}.
$$
In particular, $\lambda \in\rho(L)$ iff $\overline{\lambda}\in\rho(L^{\star})$ and the resolvents satisfy $R_{L}(\lambda)^{\star}=R_{L^{\star}}(\overline{\lambda})$. This last equation holds very generally in the sense that one exists iff the other does and, in that case, the two always equal. So, if $L=L^{\star}$ then $\lambda\in\rho(L)$ iff $\overline{\lambda}\in\rho(L)$ and, in that case, $R_{L}(\lambda)^{\star}=R_{L}(\overline{\lambda})$.
If $A,B$ are positive, commuting operators, then $AB$ is positive. This is because the unique positive $\sqrt{A}$ must also commute with $B$ and, hence,
$$
\langle ABx,x\rangle = \langle \sqrt{A}Bx,\sqrt{A}x\rangle =
\langle B\sqrt{A}x,\sqrt{A}x\rangle \ge 0.
$$
This result is useful in what follows.
Suppose $A$ is selfadjoint. Let $P=\frac{1}{2}(|A|+A)$ and $N=\frac{1}{2}(|A|-A)$, where $|A|$ is the unique positive square root of $A^2$. Then $PN=NP=0$ and $A=P-N$. This is the desired decomposition of $A$, and the trick is to show that $P,N$ are positive operators.
Let $E$ be the orthogonal projection onto $\mathcal{N}(|A|+A)$. Then $(|A|+A)E=0$ gives $E(|A|+A)=0$ by taking adjoints. And $(|A|+A)(|A|-A)=0$ gives $E(|A|-A)=|A|-A$. Hence,
$$
2EA=E(|A|+A)-E(|A|-A) = A-|A| \\
|A| = (I-2E)A \\
2E|A| = E(|A|+A)+E(|A|-A)=|A|-A \\
A = (I-2E)|A|.
$$
These two equations are consistent because $(I-2E)^2=I-4E+4E=I$ establishes $I-2E$ as its own inverse. Taking adjoints of the above equations shows that $E$ commutes with $A$ and with $|A|$, which is useful in what follows. Now the operators $P$ and $N$ may be written as
$$
P=\frac{1}{2}(|A|+A)=\frac{1}{2}(|A|+(I-2E)|A|)=(I-E)|A|, \\
N=\frac{1}{2}(|A|-A)=\frac{1}{2}(|A|-(I-2E)|A|)=E|A|
$$
Because $E$ commutes with $A$, then $E$ must also commute with $A^2$ and, hence, also with $|A|=(A^2)^{1/2}$. By the result of the first paragraph, $P=(I-E)|A|$ and $N=E|A|$ are positive.
Best Answer
$-\frac{d^2}{dx^2}$ on $C_c^\infty((a,b))$ has different self adjoint extensions, with different eigenvalues, for different choices of boundary conditions at $a, b$. Thus, it cannot be self adjoint because:
Wikipedia