Human papillomaviruses (HPV) are known to cause a variety of diseases, including cervical cancer and genital warts. HPV is a highly prevalent virus and is considered the most common sexually transmitted disease. Because of the risks associated with HPV, Gardasil, a quadrivalent recombinant vaccine, was developed by Merck & Co., Inc., Rahway, NJ, USA, and approved by the Food and Drug Administration (FDA) in 2006. The second generation of the vaccine, Gardasil9, was subsequently approved by the FDA in 2014, providing significant protection against HPV. The HPV vaccine may be given as 2 or 3 doses; however, vaccine administration as a single dose with a sustained release mechanism may potentially offer benefits to meet emerging health needs. To explore this, HPV vaccines were formulated within microporous self-healing particles (SHPs) to enable potential controlled release of HPV virus-like particle (VLP) antigen. Machine learning, in the form of multivariate curve resolution-alternating least-squares (MCR-ALS), with Raman hyperspectral imaging was used to determine the molecular identity and spatial distribution of all relevant species within this HPV vaccine formulation. The results indicate that machine learning with Raman hyperspectral imaging was able to spatially resolve HPV VLP antigens within SHP vaccines for the first time, providing crucial information necessary for vaccine development.