The hydrological cycle, surface energy balance, and the management of water resources are all significantly impacted by soil moisture. Because it governs the physical processes of evapotranspiration and rainfall penetration, surface soil moisture is a significant climatic variable. In this work, visible-near infrared (VIS-NIR) bands were used to compare and analyze the spectra of loess samples with varying moisture concentrations. The investigation looked at how changes in the soil moisture content impacted the response of the soil spectra. The researchers used a genetic algorithm (GA), interval combination optimization (ICO), and competitive adaptive reweighted sampling (CARS) to filter feature variables from full-band spectral data. To forecast the moisture content of loess on the soil surface, models like partial least squares regression (PLSR), support vector machine (SVM), and random forest (RF) were created. The findings indicate that: (1) the most reliable spectrum preprocessing technique is the first derivative (FD), which can significantly enhance the model’s prediction power and spectral characteristic information. (2) The feature band selection method’s prediction effect of soil moisture content is typically superior to that of full-spectrum data. (3) The random forest (RF) prediction model for soil moisture content with the highest accuracy was built by combining the genetic algorithm (GA) with the FD preprocessed spectra. The results may provide a new understanding on how to use VIS-NIR to measure soil moisture content.