It is due to a number of factors.Has someone who has lived in Italy and Spain, I would argue the point of better medical. They probably do live longer and happier lives but that is due to a number of factors.
But, Italy and Spain probably don't compare to Germany, Japan, the Scandinavian countries, France, and probably some others as well.
You are so correct about longevity though, it's more complex than I admitted.
However, in the US, there is a rather interesting chart for longevity and it is pretty much based on income. People with better jobs tend to have insurance, people with insurance tend to more frequent preventative care, not to mention actually having cancer care. These people definitely live longer heathier lives.
Then of course:
Food
Stress
Inner city violence.
Guns ( I own guns, I'm a Texans for goodness sake)
Why is our infant mortality rate so high?
US Has Highest Infant, Maternal Mortality Rates Despite the Most Health Care Spending | AJMC
The United States possesses the highest infant and maternal mortality rates compared with any other high-income country, even though it spends the most on health care.