The way to recover (or discover) a spectral decomposition for a selfadjoint operator is through the singularities of the resolvent operation. The operator $L = -\frac{d^2}{dx^2}$ on $L^2[0,\infty)$ is not selfajdoint on its natural domain $\mathcal{D}(L)$ consisting of all twice absolutely continuous $f \in L^2$ for which $f''\in L^2$. A selfadjoint operator requires an additional endpoint condition at $0$ of the form
$$
\cos\alpha f(0)+\sin\alpha f'(0)=0,
$$
where $0 \le \alpha < \pi$ can be assumed. The resolvent operator $R(\lambda)=(L-\lambda I)^{-1}$ can then be constructed explicitly as follows. Let
$$
\varphi_{\lambda}(x) = \sin\alpha\cos(\sqrt{\lambda}x)-\frac{1}{\sqrt{\lambda}}\cos\alpha\sin(\sqrt{\lambda}x)
$$
This is the only classical solution (up to a scalar multiple) of the classical eigenvalue equation
$$
-\varphi_{\lambda}''(x)-\lambda\varphi_{\lambda}(x) = 0 \\
\cos\alpha \varphi_{\lambda}(0)+\sin\alpha\varphi_{\lambda}'(0)=0.
$$
The only classical eigenfunction $\psi_{\lambda}$ that is in $L^2[0,\infty)$ for $\lambda\notin\mathbb{R}$ is a constant multiple of
$$
\psi_{\lambda}(x) = e^{i\sqrt{\lambda}x}.
$$
These two functions can be used to construct the general resolvent operator because one satisfies the required condition at $0$, and the other satisfies the only requirement at $\infty$, which is that the function be square integrable.
Inverse of $L-\lambda I$: In what follows $\sqrt{\lambda}$ is taken to be the principle branch of the square root, with branch cut along the positive axis. Using the two functions $\psi_{\lambda}$ and $\varphi_{\lambda}$, the resolvent $(L-\lambda I)^{-1}$ becomes
$$
R(\lambda)f=\frac{1}{w(\lambda)}\left[ \varphi_{\lambda}(x)\int_{x}^{\infty}f(t)\psi_{\lambda}(t)dt+\psi_{\lambda}(x)\int_{0}^{x}f(t)\varphi_{\lambda}(t)dt\right]
$$
where $w$ is the Wronskian, which is independent of $x$:
$$
w(\lambda) = W(\psi_{\lambda},\varphi_{\lambda})=\psi_{\lambda}\varphi_{\lambda}'-\psi_{\lambda}'\varphi_{\lambda} = -\cos\alpha-i\sqrt{\lambda}\sin\alpha
$$
To verify that $R(\lambda)$ is the correct resolvent for $\lambda\notin\mathbb{R}$, consider
\begin{align}
\frac{d}{dx}R(\lambda)f & = \frac{1}{w(\lambda)}\left[\varphi_{\lambda}'(x)\int_{x}^{\infty}f(t)\psi_{\lambda}(t)dt-\varphi_{\lambda}(x)f(x)\psi_{\lambda}(x)\right] \\
& +\frac{1}{w(\lambda)}\left[\psi_{\lambda}'(x)\int_{0}^{x}f(t)\varphi_{\lambda}(t)dt+\psi_{\lambda}(x)f(x)\varphi_{\lambda}(x)\right] \\
&= \frac{1}{w(\lambda)}\left[\varphi_{\lambda}'(x)\int_{x}^{\infty}f(t)\psi_{\lambda}(t)dt+\psi_{\lambda}'(x)\int_{0}^{x}f(t)\psi_{\lambda}(t)dt\right] \\
\frac{d^2}{dx^2}R(\lambda)f & = \frac{1}{w(\lambda)}\left[\varphi_{\lambda}''(x)\int_{x}^{\infty}f(t)\psi_{\lambda}(t)+\psi_{\lambda}''(x)\int_{0}^{x}f(t)\varphi_{\lambda}(t)dt\right] \\
& + \frac{1}{w(\lambda)}\left[-\varphi_{\lambda}'(x)f(x)\psi_{\lambda}(x)+\psi_{\lambda}'(x)f(x)\varphi_{\lambda}(x)\right] \\
& = -\lambda R(\lambda)f - f
\end{align}
Therefore,
$$
\left(-\frac{d^2}{dx^2}-\lambda\right)R(\lambda)f = f.
$$
Using the above expressions, it is also easy to check that
$$
\cos\alpha( R(\lambda)f)(0) +\sin\alpha (R(\lambda)f)'(0) = 0.
$$
So $R(\lambda)f \in \mathcal{D}(L)$ and $(L-\lambda I)R(\lambda)f=f$ for $f\in L^2$. It is also true that $R(\lambda)(L-\lambda I)f=f$ for all $f\in\mathcal{D}(L)$. So $R(\lambda)f=(L-\lambda I)^{-1}f$, at least for all $\lambda\notin\mathbb{R}$.
Spectrum of $L$: There are two factors that influence the invertibility of $L-\lambda I$. First, for $\lambda$ real and positive, $R(\lambda)$ is not bounded, which means that $[0,\infty)$ is in the spectrum of $L$. Second, if $w(\lambda)=0$ and $\lambda < 0$, then $\lambda$ is an eigenvalue of $L$, and the resolvent has a first order pole at $\lambda$.
The Wronskian vanishes if $\cos\alpha=0$ and $\lambda=0$, but this is not an eigenvalue. Otherwise, the Wronskian vanishes if
$$
\sqrt{\lambda} = i\cot\alpha.
$$
For real $\lambda < 0$, the value of $\sqrt{\lambda}$ lies on the positive imaginary axis, which means that $w(\lambda)=0$ can only occur if $\cot\alpha \ge 0$, which includes any $\alpha \in (0,\pi/2]$. For example, in the case where $\alpha=\pi/4$, the Wronskian vanishes at $\lambda=-1$, which corresponds to the fact that the condition $f(0)+f'(0)=0$ leads to a non-trivial eigenfunction $f(x)=e^{-x}$ of $L$ with eigenvalue $-1$, which is easily directly verified. $L$ has a negative eigenvalue $\lambda$ whenever $0 < \alpha < \pi/2$, but not for $\pi/2 \le \alpha < \pi$. So the spectrum of $L$ consists of continuous spectrum $[0,\infty)$, and one negative eigenvalue $\lambda = -\cot^2\alpha$ for $0 < \alpha \le \pi/2$.
The expression for the resolvent always has the positive real axis as part of its set of singularities, along with a possible negative eigenvalue. So that's the spectrum of $L$, which depends on the condition at $0$ through the parameter $\alpha$. Integrating around the resolvent set on a negatively oriented contour $C$ is known to give $\frac{1}{2\pi i}\int_{C}R(\lambda)fd\lambda = f$. A negatively oriented contour is needed because $R(\lambda)=\frac{1}{L-\lambda I}$ instead of $\frac{1}{\lambda I - A}$. The function $\varphi_{\lambda}$ is an entire function of $\lambda$, while $\psi_{\lambda}$ has a branch cut along the positive real axis. The Wronskian also contributes a branch cut, as well as a pole at the negative eigenvalue of $L$, if there is one. The above equation then leads to a complete eigenfunction expansions of $f\in L^2$ in terms of eigenfunctions of $L$. This is obtained from a single residue at the eigenvalue, and from a continuous integral expansion coming from the branch cut. For $\mu > 0$, the contributing part of the integral with respect to the spectral parameter involves
\begin{align}
&\frac{1}{2\pi i}\{R(\mu+i0)f-R(\mu-i0)f\} \\
=&\frac{1}{2\pi i}\varphi_{\mu}(x) \int_{0}^{x}f(t)\left(\frac{\psi_{\mu+i0}(t)}{w(\mu+i0)}-\frac{\psi_{\mu-i0}(t)}{w(\mu-i0)}\right)dt \\
&+\frac{1}{2\pi i}\left(\frac{\psi_{\mu+i0}(x)}{w(\mu+i0)}-\frac{\psi_{\mu-i0}(x)}{w(\mu-i0)}\right)\int_{x}^{\infty}f(t)\varphi_{\mu}(t)dt \\
=&\frac{1}{2\pi i}\varphi_{\mu}(x)\int_{0}^{x}f(t)\left(\frac{e^{i\sqrt{\mu}t}}{-\cos\alpha-i\sqrt{\mu}\sin\alpha}-\frac{e^{-i\sqrt{\mu}t}}{-\cos\alpha+i\sqrt{\mu}\sin\alpha}\right)dt \\
&+\frac{1}{2\pi i}\left(\frac{e^{i\sqrt{\mu}x}}{-\cos\alpha-i\sqrt{\mu}\sin\alpha}-\frac{e^{-i\sqrt{\mu}x}}{-\cos\alpha+i\sqrt{\mu}\sin\alpha}\right)\int_{x}^{\infty}\varphi_{\mu}(t)f(t)dt \\
=&\frac{1}{\pi(\cos^2\alpha+\mu\sin^2\alpha)}\varphi_{\mu}(x)\int_{0}^{x}f(t)\{\sqrt{\mu}\sin\alpha\cos(\sqrt{\mu}t)-\cos\alpha\sin(\sqrt{\mu}t) \}dt \\
&\frac{1}{\pi(\cos^2\alpha+\mu\sin^2\alpha)}\{\sqrt{\mu}\sin\alpha\cos(\sqrt{\mu}x)-\cos\alpha\sin(\sqrt{\mu}x) \}\int_{x}^{\infty}f(t)\varphi_{\mu}(t)dt \\
=&\frac{\sqrt{\mu}}{\pi(\cos^2\alpha+\mu\sin^2\alpha)}\varphi_{\mu}(x)\int_{0}^{\infty}f(t)\varphi_{\mu}(t)dt
\end{align}
This leads to an $L^2[0,\infty)$ expansion for $f$
$$
f(x) = \frac{1}{\pi}\int_{0}^{\infty}\frac{\sqrt{\mu}}{\cos^2\alpha+\mu\sin^2\alpha}\varphi_{\mu}(x)\int_{0}^{\infty}f(t)\varphi_{\mu}(t)dtd\mu+\mbox{possible residue term}
$$
And this also gives the $L^2$ Parseval identity
$$
\int_{0}^{\infty}|f(x)|^2 = \frac{1}{\pi}\int_{0}^{\infty}\left|\int_{0}^{\infty}f(t)\varphi_{\mu}(t)dt\right|^2\frac{\sqrt{\mu}}{\cos^2\alpha+\mu\sin^2\alpha}d\mu+\mbox{(possible residue term)}|(f,\varphi_{\mu_e})_{L^2}|^2
$$
If $f\in\mathcal{D}(L)$ and if $\mu_e$ is the possible negative eigenvalue, then
$$
Lf = \frac{1}{\pi}\int_{0}^{\infty}\frac{\mu\sqrt{\mu}}{\cos^2\alpha+\mu\sin^2\alpha}\varphi_{\mu}(x)\int_{0}^{\infty}f(t)\varphi_{\mu}(t)dtd\mu + \mu_{e}\cdot\mbox{ possible residue term}
$$
For example, if $\alpha=0$, then everything reduces to the Fourier sine transform expansion after the spectral change of variable $\mu=s^2$:
\begin{align}
f & = \frac{1}{\pi}\int_{0}^{\infty}\sqrt{\mu}\varphi_{\mu}(x)\int_{0}^{\infty}f(t)\varphi_{\mu}(t)dtd\mu \\
& = \frac{1}{\pi}\int_{0}^{\infty}\sqrt{\mu}\frac{\sin(\sqrt{\mu}x)}{\sqrt{\mu}}\int_{0}^{\infty}f(t)\frac{\sin(\sqrt{\mu}t)}{\sqrt{\mu}}dt d\mu \\
& = \frac{2}{\pi}\int_{0}^{\infty}\sin(sx)\int_{0}^{\infty}f(t)\sin(st)dtds \\
Lf & = \frac{2}{\pi}\int_{0}^{\infty}s^2\sin(sx)\int_{0}^{\infty}f(t)\sin(st)dtds.
\end{align}
Similarly, if you let $\alpha=\frac{\pi}{2}$, you arrive at the Fourier cosine representation. But you get all the oddball representations as well for the other possible $\alpha$, including the ones where there is a negative eigenvalue. The added eigenvalue results in a one-dimensional projection onto the corresponding eigenvector. The normalized eigenvector projection $(f,\varphi_{\mu})\varphi_{\mu}$ is obtained by finding the residue of the resolvent at the eigenvalue.
Best Answer
As it is usually defined, the domain and range of the Laplace transformation are different spaces. The domain is usually a space of measurable functions defined on $[0,+\infty)$, and the range a space of holomorphic functions. One can however choose a space $V$ as the domain such that $\mathcal{L}(V) \subset V$ [for example the space of bounded holomorphic functions defined on the right half-plane], and then one can view $\mathcal{L}$ as an endomorphism of $V$.
But the main source of calling the Laplace transformation a linear operator is that not all people reserve the term "operator" for endomorphisms, many people call any [or possibly only continuous or closed] linear maps "operator". With that convention, the Laplace transformation is a linear operator in the more common settings.