HIV/AIDS remains a significant public health challenge in the world, despite advancements in treatment and prevention over the past few decades. Owing to this fact, we study the relationship between HIV mortality trends, prevalence, and diagnosis rates by employing machine learning methods and optimal design theory. Using advanced machine learning models such as Multiple Linear Regression (MLR), Random Forest (RF), Gradient Boosting Machine (GBM), Extreme Gradient Boosting (XGBoost), and Support Vector Regression (SVR), we predicted HIV-related death rates. The analysis incorporates I-optimal design, a powerful methodology that minimizes prediction variance to enhance model optimization and reliability. Data preprocessing ensured high-quality inputs by addressing missing values, standardizing variables, and handling outliers. The findings reveal that SVR outperformed other models with the lowest mean squared error and the highest R². Moreover, integrating I-optimal design improved linear model performance. These results highlight the importance of aligning data design methodologies with model complexity to inform public health interventions. The study underscores the value of optimal design and machine learning in guiding evidence-based resource allocation and improving health outcomes for HIV-affected populations.