As you yourself have pointed out, the situtaion on the ground is similar in both countries. Clearly many Americans feel that the situation is worth the trouble in Afghanistan but not Iraq. And the "political attempts to deligitamzie the Iraq war" might also be described as the "legitimate opposition to war we shouldn't have gotten into." Your argument seems to be "Never mind why we went in to Iraq--the important thing is now it's just like Afghanistan so we need to stay there just like we're staying in Afghanistan. " It's not the most compelling argument in the world.
Well, it wasn't the Democrats who dragged out the "Mission Accomplished" banner. I defy you to show me how the Bush administration advised our country as we entered into this conflict that this would be a long and bloody struggle that would consume years and years of time and billions and billions of dollars.