Short answer:
They were provided for-- most ended up being adopted in Mexico.
Discussion:
The Balmis expedition -- officially the Real Expedición Filantrópica [or "Maritima" you'll see both references] de la Vacuna -- deserves to be much better known as an extraordinary effort to inoculate populations, including indigenous populations, against smallpox in the early 19th century. Jenner himself was an admirer.
You're referring specifically to the less pleasant aspect of Balmis project, carrying the cowpox (not smallpox) virus in human hosts from the Old world to the New. These boys are described as orphans, were in the care of the director of the Coruña orphanage, one Isabel Zendal Gómez, with additional assistance
[The Project] provided for a director, two assistants, two male nurses, and fifteen to twenty non-immune boys for progressive inoculation during the voyage. Since Balmis's plan indicated that the expedition would leave from La Coruña, the Casa de Ninos Expositos and the Hospicio de Pobres (Poorhouse) in Santiago de Compostela could provide the young boys.
There appear to have been twenty two boys, under the age of ten at the time of departure, but as Balmis recruited other boys at various ports of call the total number was higher. He inoculated boys from previously inoculated boys, from arm to arm, two at a time (always a "spare", because this was a very hit or miss process). He actually had a plan to create a vaccine institute in the New World using orphans there to expand the effort, although his program wasn't followed, vaccine boards were established around the Spanish empire. It was a remarkably ambitious effort, almost premature in its anticipation of much later public health campaigns. Balmis understood the importance of communicating his mission in terms that were acceptable to suspicious populations -- after a notable failure where he went at the problem with a "I know more than you about this" approach. He enlisted the clergy, wrote a pamphlet . . . seen two centuries later, he impresses.
There is reasonably detailed and reliable account of "what happened next for his orphans", and there was concern for their future well being, there's a royal order of 1803 directing that the Viceroy in New Spain provide for their well being and education until reaching adulthood. They were placed in what is described as an asylum (not the contemporary sort) which Balmis later found unsatisfactory. Balmis continues to complain of their conditions in 1806, at which time they're transferred to an Escuela Patriotica adjacent to the Real Hospicio; there is further documentation in 1809, which is the last official inquiry into their affairs.
Some of the boys are reported to have run away, others were adopted. We know many names, for example one Pedro Marcos Gutierrez, a merchant, is reported to have adopted Francisco Antonio, Clemente, and Manuel Maria in November, 1807. Smith [1974] suggests that "the children's fate in Mexico was perhaps better than it would have been if they had never left Spain".
Sources:
There's an extensive correspondence file in the Spanish archives, not easily accessed so far as I'm aware, more easily accessed in secondary sources. In English the best of them that I've seen are:
Smith, Michael M. “The ‘Real Expedición Marítima De La Vacuna’ in New Spain and Guatemala.” Transactions of the American Philosophical Society, vol. 64, no. 1, 1974, pp. 1–74. [Smith has the most detail on subsequent inquiry into the orphans' conditions]
Tuells, J. “Francisco Xavier Balmis (1753-1819), a Pioneer of International Vaccination.” Journal of Epidemiology and Community Health (1979-), vol. 56, no. 11, 2002
MARK, CATHERINE, and JOSÉ G. RIGAU-PÉREZ. “The World's First Immunization Campaign: The Spanish Smallpox Vaccine Expedition, 1803–1813.” Bulletin of the History of Medicine, vol. 83, no. 1, 2009, pp. 63–94.
and
RUSNOCK, ANDREA. “Catching Cowpox: The Early Spread of Smallpox Vaccination, 1798–1810.” Bulletin of the History of Medicine, vol. 83, no. 1, 2009, pp. 17–36
. . . which is best for the technical difficulties in transporting lymph or cowpox for inoculation ("variolation" as it was then called).
If you can read Spanish, there's much more -- the above articles are substantially based on documents held in the Archivo General de Indias (in Sevilla, Spain) and the Archivo General de la Nacion (Mexico City).
Balmis himself wrote the Tratado histórico y práctico de la vacuna [Madrid, 1803], available online here: https://archive.org/details/b22041114/page/n21
Isabel Zendal Gómez is a popular subject, and there are books devoted to her and her charges, but I haven't seen a scholarly treatment.