Raman spectroscopy has become a powerful analytical tool highly demanded in many applications such as microorganism sample analysis, food quality control, environmental science, and pharmaceutical analysis, owing to its non-invasiveness, simplicity, rapidity and ease of use. Among them, quantitative research using Raman spectroscopy is a crucial application field of spectral analysis. However, the entire process of quantitative modeling largely relies on the extraction of effective spectral features, particularly for measurements on complex samples or in environments with poor spectral signal quality. In this paper, we propose a method of utilizing a spectral encoder to extract effective spectral features, which can significantly enhance the reliability and precision of quantitative analysis. We built a latent encoded feature regression model; in the process of utilizing the autoencoder for reconstructing the spectrometer output, the latent feature obtained from the intermediate bottleneck layer is extracted. Then, these latent features are fed into a deep regression model for component concentration prediction. Through detailed ablation and comparative experiments, our proposed model demonstrates superior performance to common methods on single-component and multi-component mixture datasets, remarkably improving regression precision while without needing user-selected parameters and eliminating the interference of irrelevant and redundant information. Furthermore, in-depth analysis reveals that latent encoded feature possesses strong nonlinear feature representation capabilities, low computational costs, wide adaptability, and robustness against noise interference. This highlights its effectiveness in spectral regression tasks and indicates its potential in other application fields. Sufficient experimental results show that our proposed method provides a novel and effective feature extraction approach for spectral analysis, which is simple, suitable for various methods, and can meet the measurement needs of different real-world scenarios.