In 1820, 85% of the worlds population lived under a dollar a day, in 2001 the figure was 18%. (Sachs and Warner - Economic reform and the process of global integration").
Looking at just developing countries, In 1990, 31% of the population of the developing world lived on less than $1 a day - close to 1.4 billion. In 2008, half that proportion did - 14%, or about 800 million.
This also represents a drop in the absolute number of people below this poverty line, a first in world history.
What is more the reductions in these poverty levels can largely correlated with an expansion in global trade.
The overall wealth of world has also expanded thanks to globalization, while the destruction of the middle class (stagnation would be a fairer term) is much more prominent in the countries like the USA, where it has been intentionally exacerbated by government policy that favors the class of people that are already benefiting most from globalization.
The answer is not to constrain world wealth by throwing up national barriers but to ensure that govt policy has mechanisms to ensure a just distribution (starting with the no brainers in education, healthcare, infrastructure, but also other social programs).