None of the adversaries listed were capable of executing modern warfare, leave alone be near peer....
Let's talk about Iraq first. Iraqi forces were able to occupy numerous Iranian lands in 1980 despite being a mediocre military force at the time. Iran is much larger than Iraq and not a pushover in its own lands. Not surprisingly, Iran was able to turn the tide of this war in 1982 and put Iraq on the defensive; Iranian navy also destroyed Iraqi navy during this time.
Iraq had no choice but to rebuild its military capability. The rebuilding process took time because there was much pressure on Iraq to fend off Iranian attacks from time-to-time and losses were mounting. Iraqi defense of Basra in the (December 1986 - April 1987) period was a noteworthy achievement in particular.
Iraq was able to put together a much better equipped force by 1988 and used it to defeat Iranian forces in a series of battles identified as
Tawakalna ala Allah Operations.
Iraq had become a well equipped and battle-hardened side for a country of its size and even across the pan-Islamic bloc in 1991. When Iraq invaded Kuwait in 1990, the entire GCC bloc was in panic mode and could not hope to liberate Kuwait on its own. Even countries like Egypt and Pakistan could not help liberate Kuwait at the time, not even together.
Iraqi Army had established an integrated Air Defense system, which set it apart from any other across the pan-Islamic bloc in 1990. This system is credited for downing dozens of aircraft of the US-led coalition in 1991. This was the case in spite of the fact that US-led coalition was using heliborne special forces, cruise missiles, and stealthy aircraft to degrade Iraq's Air Defense system in a remarkable combination of military technologies and tactics that had no peer around the world at the time.
Let's talk about Yugoslavia now. Yugoslavia had created a professional military force in the 1990s. Yugoslavian forces would have overcome Kosovo separatists in war but NATO supported the latter side.
It is easy to say that these countries could not fight because US-led coalition defeated them in war.
China is definitely creating a modern military force but China does not have operational exposure on the level of the US. There is much that China will find out in actual war, if it breaks out.