USA/NATO were the First World. USSR/Warsaw Pact was the Second World. Everyone else was Third World.
That definition includes countries like Switzerland, which sounds very strange today, because the meaning has changed to precisely the one you have in mind.
That said, "developing country" isn't necessarily the most precise phrase either, since many of those countries are either keeping the status quo or are actively decaying due to environmental disaster, war, famine, etc... Also, when you say "developing country" what a lot of people still heard is "shithole". Still, it's the preferred phrase and the inherent optimism built into it does count for a little.
Where the first world would be the US influence sphere, and the second world being USSR influence sphere.