This paper addresses the medical kit allocation problem by employing a unified robust stochastic programming (URSP) approach to enhance medical supply chain (MSC) viability during pandemics. A two-stage methodology is developed to account for the inherent uncertainty of demand. It begins with a machine learning (ML) algorithm for contagion level prediction, which adjusts demand forecasts accordingly. Subsequently, the URSP approach incorporates risk aversion and various types of uncertainty by combining stochastic programming and robust optimization through an adjustable weight in the objective function. As a risk-aversion technique, conditional value-at-risk (CVaR) is employed to restrict shortage levels, providing a more realistic assessment of MSC resilience. To balance cost-effectiveness and robustness against a spectrum of uncertainties, the URSP method leverages the strengths of both stochastic programming and robust optimization. Taguchi's orthogonal array design is utilized to generate cases representing combinations of government policies aimed at mitigating potential risks during future epidemics or pandemics. The effectiveness of the proposed methodology is demonstrated through a comprehensive case study conducted in Türkiye, comparing several modeling approaches. Extensive experiments under different types of uncertainties are performed to assess MSC viability. Computational analysis reveals that the URSP approach provides more robust and computationally tractable solutions than the purely stochastic approach and offers more cost-effective kit allocation decisions than the purely robust approach by allowing decision-makers to fine-tune the robustness level based on their priorities. The insights indicate that integrating ML predictions with URSP significantly enhances MSC viability to withstand deep uncertainties during pandemics.