If one really looks at that massive amount of migration these days it is from;
1. wars, civil unrest etc
2. economic migration--simply people looking for work and a better economic life

So does it not behoove us to stem the flow of economic migration simply by investing in their future?

In the long run it is probably cheaper that all the wars we have been in -in the last say 15 years.
I don't think migration had much to do with our recent events in Iraq and Afghanistan. Furthermore, all the unicorns and rainbows talk about fixing the global economic system, much less a particular country's economic system, is well beyond our capacity UNLESS that country desires to commit to those reforms.

The issues in Iraq and Afghanistan are tied to the ancient reasons people fight: fear, honor, and interests. The key interest is one group desires to have power, and no they're not going to fix the underlying issues related to economic systems that only favor a few, they'll just shift the system so it benefits them.

Globalization is having both negative and positive impacts on the world, and the negative impacts are quite severe. Those impacted by it, like the Iraqi Shoe salesman you referred to would disagree that globalization is neutral. Interestingly enough, Australia, among other rejected the Trans-Pacific Partnership trade agreement recently. I'm not convinced that the globalization we see today is irreversible. When states recognize it is hurting their interests, they'll establish protective barriers. Overtime that could lead to war.