The rapid emergence and overlapping clinical presentations of viral infectious diseases such as COVID-19 and dengue pose significant challenges for timely diagnosis and risk stratification in resource-limited settings. Conventional single-model approaches often suffer from limited generalizability, class imbalance, and suboptimal feature utilization, resulting in delayed interventions and inefficient resource allocation. This study introduces a weighted adaptive confidence-aware ensemble machine learning framework (WACAM) for accurate early detection and subsequent severity prediction of viral infections using routine hematological and demographic data. A merged dataset comprising 1,369 patient records was preprocessed with median imputation, Z-score outlier handling, Winsorization, and standard scaler normalization. Boruta feature selection identified key clinical markers, followed by synthetic minority over-sampling technique (SMOTE) for class balancing. Seven diverse base learners were integrated through a novel confidence-weighted soft-voting scheme. Model weights were adaptively assigned via exponential softmax of out-of-fold (OOF) area under the curve (AUC) scores, with an optimized probability threshold maximizing Matthews correlation coefficient (MCC). The proposed WACAM achieved superior performance with 86.5% accuracy, 0.8795 F1-score, 0.9156 ROC-AUC, and 0.726 MCC on the test set, outperforming individual models.