In a study aimed at developing a rapid and nondestructive method for testing the quality of strawberries, spectral data from four strawberry varieties at different ripening stages were collected using a geophysical spectrometer, primarily focusing on the 350–1800 nm band. The spectra were preprocessed using Savitzky–Golay (SG) filtering, and characteristic bands were extracted using Pearson correlation coefficient (PCC) analysis. Models for predicting strawberry quality were built using random forest (RF), support vector machine (SVM), partial least squares (PLS), and Gaussian regression (GPR). The results indicated that the SVM model exhibited relatively high accuracy in predicting anthocyanin, hardness, and soluble solids content in strawberries. For the test set, the SVM model achieved R2 and RMSE values of 0.81, 0.87, and 0.89, and 0.04 mg/g, 0.33 kg/cm2, and 0.72%, respectively. Additionally, the PLS model demonstrated relatively high accuracy in predicting the titratable acid content of strawberries, achieving R2 and RMSE values of 0.85 and 0.03%, respectively, for the test set. These findings provided a solid foundation for strawberry quality modeling and a veritable guide for non-destructive assessment of strawberry quality.