Raman and surface-enhanced Raman scattering (SERS) spectroscopy are highly specific and sensitive optical modalities that have been extensively investigated in diverse applications. Noise reduction is demanding in the preprocessing procedure, especially for weak Raman/SERS spectra. Existing denoising methods require manual optimization of parameters, which is time-consuming and laborious and cannot always achieve satisfactory performance. Deep learning has been increasingly applied in Raman/SERS spectral denoising but usually requires massive training data, where the true labels may not exist. Aiming at these challenges, this work presents a generic Raman spectrum denoising algorithm with self-supervised learning for accurate, rapid, and robust noise reduction. A specialized network based on U-Net is established, which first extracts high-level features and then restores key peak profiles of the spectra. A subsampling strategy is proposed to refine the raw Raman spectrum and avoid the underlying biased interference. The effectiveness of the proposed approach has been validated by a broad range of spectral data, exhibiting its strong generalization ability. In the context of photosafe detection of deep-seated tumors, our method achieved signal-to-noise ratio enhancement by over 400%, which resulted in a significant increase in the limit of detection thickness from 10 to 18 cm. Our approach demonstrates superior denoising performance compared to the state-of-the-art denoising methods. The occlusion method further showed that the proposed algorithm automatically focuses on characterized peaks, enhancing the interpretability of our approach explicitly in Raman and SERS spectroscopy.