This framework has been emphasized by Paul Krugman for instance who says
What we’re basically looking at, then, is a balance of payments problem, in which capital flooded south after the creation of the euro, leading to overvaluation in southern Europe. It’s not a perfect fit — Italy managed to have relatively high inflation without large trade deficits. But it’s the main way you should think about where we are.To assess this, here is the current account balance (as a percentage of GDP) for the PIIGS countries, together with Germany, France, and Holland for European contrast, and the US and China for broader contrast:
You can see that indeed Portugal, Greece, and Spain very much look like this: countries that ran large current account deficits for well over a decade. Ireland only ran a much smaller deficit more recently, and Italy's problems are mainly high public debt from earlier times, rather than large recent inflows.
Note that the US has also been running significant current account deficits for a long time. Like the PGS trio, we still are. Also like them, the deficits have moderated somewhat since the crisis of 2008.
It's easier to see if we just add up the deficits/surpluses across the years to get the accumulated balance since 1995:
This is not a perfect procedure: 1995 is roughly the start of the modern pattern in current account flows, but it's still somewhat arbitrary and accumulating deficits since then tells us nothing about the relative shape of countries at that time.
Still, it's interesting that the scale of the deficits the US has accumulated, relative to the size of our economy, are not far from Spanish levels.