The part of military planning that you do not seem to understand is that the enemy gets a vote in how the war goes as well. There were definitely some aspects of the post-Saddam military situation that unexpectedly occurred and some aspects that unexpectedly did not occur. This does not mean the planners failed in anything other than the ability to perfectly predict the future.
Military operations are all about Action, Reaction, and Counteraction. For you to assume that our changing of tactics to react to a change in the enemy's tactics is evidence of a failure on our part simply highlights your ignorance on the subject.
I am curious why you believe either Iran or North Korea would fare any better in a conventional war with us than Iraq did? If you wish to argue that both of these nations will learn the lessons of Iraq and choose to fight us in a protracted insurgent style rather than toe to toe you would have a valid point but to imply that they could go toe to toe is something else entirely.
If you are expecting guarantees of future safety, I would chalk that up as further irrational thinking on your part. There can be no guarantees, the best we or anyone can do is make an assessment based on the information available.
It is our war. It became our war the moment our President and our Congress sent our soldiers to fight it.