Consider a 3D infinite square "box", satisfying the time-independent S.E. $$ \begin{align*} -\frac{\hbar^2}{2m}\nabla^2 \psi &= E\psi, \;\;\; x,y,z\in[0,a], \\ \psi &= 0, \;\;\;\;\;\; \text{otherwise}. \end{align*} $$ The standard method for finding the allowed energies seems to be separation of variables. We write $\psi(\mathbf r) = X(x)Y(y)Z(z)$, so $$ -\frac{\hbar^2}{2m}\left(YZ\frac{\mathrm d^2 X}{\mathrm d x^2} + XZ\frac{\mathrm d^2 Y}{\mathrm d y^2} + XY\frac{\mathrm d^2 Z}{\mathrm d z^2} \right) = EXYZ, $$ and dividing by $XYZ$ on both sides yields $$ -\frac{\hbar^2}{2m}\left(\frac 1X\frac{\mathrm d^2 X}{\mathrm d x^2} + \frac 1Y\frac{\mathrm d^2 Y}{\mathrm d y^2} + \frac 1Z\frac{\mathrm d^2 Z}{\mathrm d z^2} \right) = E. $$ At this point the problem is reduced to three 1D infinite square well equations, and we get the allowed energies $$ E = \frac{\pi^2 \hbar^2}{2ma^2}(n_x^2 + n_y^2 + n_z^2), \;\;\; n_x,n_y,n_z \in \mathbb N, $$ and eigenfunctions $$ \psi = X_{n_x} Y_{n_y} Z_{n_z} = \left(\frac 2a\right)^{3/2}\sin\left(\frac{n\pi y}{a} \right)\sin\left(\frac{n\pi x}{a} \right)\sin\left(\frac{n\pi z}{a} \right). $$ My question is, how can we be sure that we've obtained all of the possible eigenvalues/eigenfunctions, and that there isn't some rogue eigenfunction/eigenvalue roaming somewhere out there, that cannot be expressed as a separable solution $\psi = XYZ$?
For the 1D infinite square well, for example, we were able to obtain the general solution to the differential equation $$ -\frac{\hbar^2}{2m}\frac{\mathrm d^2 \psi}{\mathrm d x^2} = E\psi $$ and apply boundary conditions to get the allowed energies. Hence, I can see why we must have gotten all of the possible eigenvalues and eigenfunctions in that case. But for the 3D case $\psi = XYZ$ does not seem to be the general solution, though I could be mistaken.
More importantly, separation of variables is used in solving the hydrogen S.E., by assuming that $\psi(\mathbf r) = R(r)Y(\theta,\phi)$. I have a hard time convincing myself mathematically that there is not some non-separable eigenfunction out there, with some energy that cannot be written as $-13.6 n^{-2} \; \mathrm{eV}$, though experimental results clearly suggest otherwise.
Edit: To clarify my question, I understand how $\hat H \psi = E\psi$ is derived using separation of variables from its time-dependent counterpart $\hat H \Psi = i\hbar \partial _t \Psi$, and how the solutions $\{\psi\}$ of $\hat H \psi = E\psi$ are a complete orthonormal set that can be linearly combined to construct any $\Psi$ in Hilbert space that satisfies $\hat H \Psi = i\hbar \partial _t \Psi$. ($\hat H$ is an observable operator, and QM assumes that the eigenfunctions of all observable operators are a complete set.)
My question is, in applying separation of variables to $\hat H \psi = E\psi$ again, how can we be sure that we didn't miss out on any of those $\psi$'s which make up that complete orthonormal set with which we construct solutions to $\hat H \Psi = i\hbar \partial _t \Psi$, as we do not obtain the general solution to $\hat H \psi = E\psi$, as we usually do in 1D cases?