We consider a sequence X-(n), n >= 1, of continuous-time nearest-neighbor random walks on the one dimensional lattice Z. We reduce the spectral analysis of the Markov generator of X((n)) with Dirichlet conditions outside (0, n) to the analogous problem for a suitable generalized second order differential operator - D-mn D-x, with Dirichlet conditions outside a given interval. If the measures dm(n) weakly converge to some measure dm(infinity), we prove a limit theorem for the eigenvalues and eigenfunctions of - D-mn D-x to the corresponding spectral quantities of - D-m infinity D-x. As second result, we prove the Dirichlet-Neumann bracketing for the operators - D-m D-x and, as a consequence, we establish lower and upper bounds for the asymptotic annealed eigenvalue counting functions in the case that m is a self-similar stochastic process. Finally, we apply the above results to investigate the spectral structure of some classes of subdiffusive random trap and barrier models coming from one-dimensional physics