Not always, but often times the reason their country is a horrible place to live is because of historical racism in the form of colonisation on the part of European countries or the USA. And it goes without saying that just because something is worse in place A doesn't mean it isn't bad in place B.
Do you know the etymology of the word "slave", that is comes from the Slavic tribes who inhabited central Europe and were enslaved by Arabs: 'The Slav was the most prized of human goods. With increased strength outside his marshy land of origin, hardened to the utmost against all privation, industrious, content with little, good-humoured, and cheerful, he filled the slave markets of Europe, Asia, and Africa. It must be remembered that for every Slavonic slave who reached his destination, at least ten succumbed to inhuman treatment during transport and to the heat of the climate. Indeed Ibrāhīm (tenth century), himself in all probability a slave dealer, says: "And the Slavs cannot travel to Lombardy on account of the heat which is fatal to them." Hence their high price.' (The Cambridge Medieval History, Vol. II, 1913).
I can go on forever for the history of humanity is indeed a sordid affair, riddled with accounts of cruelty and - seen through modern western eyes steeped in Judeo-Christian morality - truly proof of the fallen nature of the human race. I won't since it doesn't change the fact that societies and cultures rise and fall through conquest, then and now. Claiming, as you do, that "...the reason their country is a horrible place to live is because of historical racism in the form of colonisation on the part of European countries or the USA" is myopic, it stems from a vision of the world as a European/American-centric place where all roads lead to Europe and America.
This self-flagellation which is so popular in many western cultures needs to stop or those same cultures will succumb to the process of history which gave rise to them in that other cultures will take over. Many of those cultures don't care about racism - they are openly racist - and have no qualms about slavery.
The more things are called racist, the less people will care. OK, so I'm racist for making rice pudding? Fine, so be it.