The question is rather simple. We all hear all the time that an observable of a quantum mechanical system (for some observable that is given by a some self-adjoint operator, let's call it $H$) is given by the eigenvalues of this operator $H$. One also often hears (reads) that the set of all the possible values you can measure (in your experiment for example) is given by the spectrum of an operator $H$. I have a conundrum here. which of the two is it? When we measure something in quantum mechanics are we measuring the eigenvalues or the spectrum?
It is important to note that these two things are $\textbf{NOT}$, in general, the same. For finite-dimensional operators sure, they happen to correspond, but for non-finite operators, they are categorically different. One guarantees that $\exists \lambda$ such that for some $\psi_\lambda$ we have $H\psi_\lambda=\lambda \psi_\lambda$ and the other that the matrix $H-\lambda I$ is non-invertible.
Am I missing some assumption here? I know there are examples of operators with a nonvanishing spectrum that have no eigenvalues (I think multiplication by a sine function is one example if I am not mistaken).
What is the definition (formally) of the observables of a QM system? and also why is it defined in that way and not the other (I suspect there is some theorem/result/definition that only works if we use one and not the other).