The primary impact here is that, because the population is getting older, there has been (and will continue to be, for a number of decades at least) an increase in the burden being placed on the healthcare system. If the healthcare system fails to build sufficient capacity, this will result in poorer health outcomes for the nation as a whole as the healthcare system gets further and further bogged down by the increased demand.
To the extent that increased transfer payments to the elderly crowd out funds for education and health care for the young, this exacerbates the problem by also making the younger population less healthy. In addition, the growing number and percentage of children born to older parents have a higher chance of developmental problems.
Illegal immigration tends to make the population less healthy on average because illegal residents often come from environments with very poor health and education levels, many are unimmunized, many lack the knowledge and money for good self-care, and they are ineligible for many kinds of free care. Their children, whether brought here young or born here, suffer from their parents’ status and poor understanding of nutrition and disease.
Legal immigrants, on the other hand, may actually raise the average health level of the population, especially if the immigration system favors people with good health and high levels of education.