It's not that we've been militarily defeated. We haven't been. In direct combat, we win every time. We smashed Saddam's army and have killed many more terrorists and insurgents than we have lost at their hands. Most of our casualties have been caused by IEDs. Nor have any of the groups fighting us—such as Ba'athist diehards, al-Qaeda, and the Mahdi Army—won the hearts and minds of the people of Iraq. But we have still lost, politically. Despite the best efforts not only of the Americans but of many Iraqis as well, the country has descended into sectarian civil war. That's what Abu Musab al-Zarqawi had been counting on and working towards; it's small comfort that we killed him before he could be sure he had succeeded. What the civil-war-in-all-but-name has convinced me of is that too many Iraqis would rather kill each other than live together under an equitable power-sharing arrangement among regions, ethnic groups, and religious sects.
That was always the question, at least to my mind. Without a prior tradition of genuine democracy, could the Kurds, Shi'ites, Sunnis, and smaller groups live together sucessfully in a federal, genuinely democratic state that respected basic human rights? If the answer had been yes, the war would have been worth it. But the answer that is clearly emerging is no. So the war isn't worth it.
How to get out without "cutting and running" and making things even worse is an interesting question that I lack the knowledge and firsthand experience to answer. Perhaps there is no useful answer, in which case our only acceptable course would be to maintain enough of a presence for long enough to prevent the kiling from getting even worse when we finally do leave the field. But that will occasion many more casualties and probably lose the Republican Party the next presidential election.
As Admiral Kirk said while kicking the Klingon commander into the fiery abyss: C'est là vie.