They DID know at the time. Bush was very upfront about what he wanted to do and most supported him. Turning those nations into a Western-friendly democracies was a noble and worthy goal but it didn't work.
What you want to do is go back in hindsight and lecture everyone about how smart you are. But, most people like you agreed with Bush at the time.
Bush told everybody it would be a 17 year thing? I don’t remember that. What I do remember is Bush speaking against nation building when he was running for office, that was before he went all in on nation building. I realize that we need to deal with what we have started. I just don’t think get a warm and fuzzy about starting more. Besides, Trump did say he would get us out of Syria.