Lower back pain (LBP) is a musculoskeletal condition that affects millions of people worldwide and significantly limits their mobility and daily activities. Appropriate ergonomics and exercise are crucial preventive measures that play a vital role in managing and reducing the risk of LBP. Individuals with LBP often exhibit spinal anomalies, which can serve as valuable indicators for early diagnosis. We propose an advanced machine learning methodology for LBP detection that incorporates data balancing and bootstrapping techniques. Leveraging the features associated with spinal anomalies, our method offers a promising approach for the early detection of LBP. Our study utilizes a standard dataset comprising 310 patient records, including spinal anomaly features. We propose an ensemble method called the random forest gradient boosting XGBoost Ensemble (RGXE), which integrates the combined power of the random forest, gradient boosting, and XGBoost methods for LBP detection. Experimental results demonstrate that the proposed ensemble method, RGXE Voting, outperforms state-of-the-art methods, achieving a high accuracy of 0.99. We fine-tuned each method and validated its performance using k-fold cross-validation in addition to determining the computational complexity of the methods. This innovative research holds significant potential to revolutionize the early detection of LBP, thereby improving the quality of life.