Haiti has a complicating factor. After winning independence from France, France told Haiti to pay 'debt' back to France. In the end, it had to pay 112 million Francs, which is an amazing sum for a newly independent country, and I think that it's unique in history, a government demanding that exorbitant of a payment from a newly independent country. It took until 1947 for Haiti to finish paying, 122 years of payment. You can't get over that sort of thing easily.
Wikipedia has a good article on it: https://en.wikipedia.org/wiki/Haiti_Independence_Debt. In another article (https://en.wikipedia.org/wiki/External_debt_of_Haiti) it's said that Haiti's debt is mostly from that demand.
That said, Cuba's life expectancy (Cuban GDP per capita: $7,486 or so, as of 2021) is equal to or greater than much wealthier countries, like Lithuania ($30,577), Oman ($46,574), Seychelles ($30,126), or Russia ($26,120). In 2020, its life expectancy surpassed the US! Cuba has consistently outperformed countries like Lithuania, Russia, and even the world in life expectancy (counting since 2000), all of which have much greater GDP per capita. See https://ourworldindata.org/life-expectancy and https://ourworldindata.org/grapher/life-expectancy-vs-gdp-pe....