The Post-Atomic Horror takes place between 2053 and 2123.
What you are mistaking is that you assume that as soon as the Vulcans make contact that just ends all of the problems. This is not the case. In First Contact we are seeing the Early years of the Post-Atomic Horror and we're only dealing with one faction of humans that are still fairly civilized in 2063.
By 2079 an attempt at a New United Nations failed. Obviously a number of factions gained enough power to form countries and have global talks, which indicates that a number of nations were recovering quite quickly, probably with the aid of the Vulcans, but there likely was a resource disparity which lead to rich nations fairing pretty well, but poor nations falling into what we see presented by Q.
By the 2100s Europe was reforming and uplifting the poorer communities, eventually forming the European Hegemony in 2123. Between this period and 2151, the United Earth Government formed and all governments by 2151 joined. 2151 is also when the NX-01 launched.
So the Post-Atomic Horror that TNG made famous with those Q episodes takes place 16 years AFTER First Contact and in areas of the world we generally don't look at in Star Trek. Most likely in Eastern Europe, Africa, and Asia.
A more full run down can be found Here
There is also a episode in TOS that likely inspired the idea of the Post-Atomic Horror called the Omega Glory. You could think of it as a "what if the Vulcans never made first contact."