WASHINGTON — Tyler Wade was awarded the Purple Heart while serving in Afghanistan, and says he is “proud of everything” he did during his service. He also believes the conflicts in Iraq and Afghanistan were a mistake, as do a growing number of veterans — from retired generals to those who served across the enlisted ranks, from supporters of President Trump to “resistance” Democrats.

“All in all, it is a lot of wasted lives and money and time and effort spent to accomplish a goal we never accomplished,” said Mr. Wade, 31, who was deployed to Iraq and Afghanistan during his five years in the Marines and is now a nursing student in Las Vegas.

Nearly two decades after the attacks of Sept. 11, 2001, polls show that a majority of all veterans have grown disenchanted with the continuing wars, even if the national security elite in both parties continue to press for an American military presence in Syria, Iraq and Afghanistan. The view is in stark contrast to widespread support for the wars across the military and veterans community — and the general population — when President George W. Bush first sent American troops to Afghanistan and then Iraq.

The shifting attitudes of so many who served in the wars help explain why Mr. Trump has support among veterans as he brings troops home and has resisted military action against other nations. There is a slow but steadily increasing alliance of those on the left and the right on Capitol Hill to curb what Mr. Trump calls “endless wars.”