As you noted, though, your belief is only one of many possible scenarios. I find it, based on a historical perspective and based on current situations, to be unlikely.
The history of Iraq, for almost 5,000 years, is that of a fractured state – in reality, of warring tribes. That’s true today, with the Kurds, Shiites, and Sunnis. The only times that “Iran” has been a unified state is when it was ruled by a totalitarian authority. Obviously, the U.S. will not do that.
So what happens if the U.S. pulls out (either immediately or in a staged process)? Most likely, there will be a power struggle between the Shiites and Sunnis, with the Kurds remaining isolated in the North (they already claim to not belong to the “unified” Iran). And what of the insurgents? Not much. They wouldn’t be able to gain in greater foothold than they have now, as any attempt to align with one faction of Iran’s population will bring about immediate reprisal by the other.
More to the point, I have yet to understand the argument that a U.S. pullout would result in “the terrorists gaining a foothold”. They have that – and the fact that it has remained largely a guerilla action points out that most Iraqis will not subscribe to their cause. If they were going to, they would have done so by now; the presence of Americans in the country would be a natural unifying force – but it hasn’t happened.
Further, what more do we have to fear? The administration claims that various other countries are already bases for terrorist operations – Syria, Iran, etc. Claiming Iraq (even if it was possible) would gain terrorist only one thing – access to oil. But if they try that, they have to create static locations that we can easily attack with little risk to us.
The reality is that 5,000 of history demonstrates that Iraq will never be democratized or unified (at least, not without totalitarian rule) – there will always be tribal conflicts and warfare.
To be unlikely? Well, I beg to differ.
I think that Iran would jump at the chance to attack Iraq, where in turn, we'd be sending soldiers back to where they'd just left from. Not because of the oil, or the nukes, but because our president would cave in to the pressure of the U.N.
If we leave, we'll just end up having to go back, sooner rather than later.
The "terrorists gaining a foothold", is the least of our worries. It's their neighbor, Iran, is whom we need to be concerned with.