A spectral series approach to high-dimensional nonparametric regression