Argentina and Brazil are about the only other countries where you can almost get away with this and legalize your existence (Argentina in particular has constitution that says essentially if you survive 2 years, you are basically citizen) , although most of Africa wouldn't bother to enforce it (South Africa in particular has almost as much illegal immigration per capita as USA although with a wide band of possible error in estimates, and they can't meaningfully enforce it).
Otherwise you need investments (usually 50k+), permanent pension, top-tier education, a professional job offer, cultural/family ties, or connections with the political apparatus. Switzerland in particular is on extreme hard mode for a non-EU citizen to get citizenship.