Abstract: We compute the generic mode sum that quantifies the effect of the change of spectrum of a harmonic field when a spherical shell is inserted into the vacuum. This encompasses a variety of problems including the Weyl spectral problem and the Casimir effect of quantum electrodynamics. The connection between the Weyl problem and the Casimir energy allows us to resolve a long-standing controversy regarding the question of universality of the Casimir self-energy. Specifically we demonstrate that in the case of a scalar field obeying Dirichlet boundary conditions on the shell surface the Casimir self-energy is cutoff-dependent, while in the case of a conductive shell the Casimir self-energy is universal.