Democrats are just people representing the party. They are allowed to have their own opinions on this issue. As a party, they still differ, to understand this we need to look at the outcome of these wars.
Iraq war was successful. But the political altercations, opposition and avoidance of misuse of power in the US messed the whole ongoing operation in Iraq and this lead to an uncontrollable situation in Iraq. To add fuel to fire, there had been opposition in other NATO countries. (Blair in the UK)
After investigating the war prerequisites, it was clear that the attack on Iraq was made on false premises and some people's assumptions (Check the GreenZone movie). The whole investigation was done by the US Senate and the information is public.
The Iraq war created the perfect chaos and gave birth to many militant groups, which terrorized the whole region. One of those unorganized militant group is ISIS. Upon evaluation, Isis isn't just a militant group. Its a by-product of a failed military operation. The chaos created by ISIS throughout the world was magnanimous.
The Syrian war was mandatory, because of the failed operation in Iraq. The US had to engage because it had to. Everyone knows the costs (Money, resources and people) associated with war. Even though Democrats weren't interested in war, they had to engage/continue to engage in Syria. With ever-rising costs to fund war and the additional funding demanded to cover the intelligence costs to avoid attacks by ISIS proved futile. These expensive additional efforts werent successful. Despite additional & forced spending, the damage caused to the US's reputation was huge. In addition, the opposition from its people grew, dividing the whole nation.
The effects on Syrians were extreme. They were forced to migrate illegally into the EU Nations. This caused those nations to face societal consequences and it propagated throughout the EU nations.
If you are an individual of a senate and were forced to go through all these investigation documents and the chaos it created throughout the world, the indifferences among representatives grew. As some of the decisions were made by democrats, during their regime, some of them had a strong negative opinion but they do not openly oppose, however some do. Hence the differences in opinion.
Both are in the Middle East, far from the US, and involve groups that
want to overthrow a dictator unfriendly to the United States.
The primary premise for war was "Iraq has chemical weapons, which (was planning to use) could be used against the US or its allies, to bring down the world order". Throughout the war, they couldn't find any chemical weapons. (As far as I know.) This continued (biased?) effort to locate the chemical weapons, based on their assumptions supported by misinformation from some people, caused the magnanimous fucked-up situation.