The compressed sensing (CS) theory requires the signal to be sparse under some transform. For most signals (e.g., speech and photos), the non-adaptive transform bases, such as discrete cosine transform (DCT), discrete Fourier transform (DFT), and Walsh-Hadamard transform (WHT), can meet this requirement and perform quite well. However, one limitation of these non-adaptive transforms is that we cannot leverage domain-specific knowledge to improve CS efficiency. This study presents a task-adaptive eigenvector-based projection (EBP) transform. The EBP basis has an equivalent effect of the principal component loading matrix and can generate a sparse representation in the latent space. In a Raman spectroscopic profiling case study, EBP demonstrates better performance than its non-adaptive counterparts. At the 1% CS sampling ratio (k), the reconstruction relative mean square errors of DCT, DFT, WHT and EBP are 0.33, 0.68, 0.32, and 0.00, respectively. At a fixed k, EBP achieves much better reconstruction quality than the non-adaptive counterparts. For specific domain tasks, EBP can significantly lower the CS sampling ratio and reduce the overall measurement cost.