I have a follow-up question to the following post: Imaginary Eigenvalue Of A Hermitian Operator.
In the post, the question reads,
The eigenfunctions of a Hermitian operator are real. But consider a function $\psi(x)=e^{-\kappa x}$, $x\in\mathbb{R}$, where $\kappa$ is a real constant. Then, $$\hat p \psi(x)=-i\hbar \frac{d}{dx}e^{-\kappa x}=i\kappa \hbar \psi(x).$$ This gives a pure imaginary eigenvalue. Is it not a contradiction? Or am I missing some crucial point?
In one of the replies, Valter Moretti says,
What is your Hilbert space? In $L^2(\mathbb R)$ your eigenfunction would have infinite norm. If you dealt instead with a bounded set $L^2([a,b])$, your operator would not be Hermitian unless you impose suitable boundary conditions to discard boundary terms. These boundary conditions, however, would rule out your candidate eigenvector!
This answer is excellent and explains a lot. However, on $\mathbb{R}$ people sometimes invoke the notion of plane wave functions $e^{ikx}$ that are used as momentum eigenstates of $\hat{p}$. These are non-normalizable functions that lie outside $L^2(\mathbb R)$.
My question is, what separates these plane wave functions $e^{ikx}$ from the exponential functions $e^{-\kappa x}$ such that we can treat the former as sometimes valid and the latter as invalid?
People often talk about the plane wave solutions as sort of helpful fictions much like Dirac delta functions, which also lie outside $L^2(\mathbb R)$. This in itself is not a problem. The question is, if we do invoke distributions outside $L^2(\mathbb R)$ every once in a while, is there a non-ad-hoc way to rule out functions of the form $e^{-\kappa x}$ ahead of time? To put it shortly, is there a mathematical formalism that handles $L^2$-functions, Dirac delta distributions, and plane waves, but it manages to rule out exponential functions as valid?