Bolero, that would be very correct. medieval levy troops consist of everything from the kitchen staff to a trained man-at-arms and was frequently lead by a noble whose training leaned towards excellent but was just as often not so good.
The roman military was a trained force that would be drilled to respond instantly to orders, as you said. Even the trained mercenaries of the middle ages would have had trouble with a Roman legion, if their equipment were of the same types. The training Romans were given was much more intensive than the training given by mercenary units.
Then you have the esprit de corps that the Roman units had, versus the same for mercenary units and levies. Levies would not have the training, but they would likely be very motivated if the attack was on their home soil. Not so much if they were far from home. Mercenaries would be in it for the money, and not so willing to back a cause, definitely not a last stand thing. Romans would have been the most solid, since they were fighting for Rome, at least in the early periods of Rome.
Towards the end of the Roman empire, the ranks of the legions had become filled with conscripts and mercenaries, so they were not as solid as the early legions at the time of Julius Gaius Caesar were.
I should, btw, contrast the Greek phalanxes in here. They were also trained warriors depending on the city state that they were from. The famous Spartans come to mind, but there were also the Myrmidons. These troops were trained and well equipped for their time and tech levels. However, the different city states had different concepts of training levels and different notions of how to keep their cities warded.
Egypt had its caste system, where you gave your utmost effort to your caste, but there did seem to be some movements in the society. Not rigid, but not wide open. The training again was not one way for the entire Upper or Lower Kingdom, but depended on the abilities of the - let me use the term - general as to training status.
Professional national armies as we know them did not show up until around the late 1600's. Up until then, especially in England, it was household troops, mercenaries and levies which made up the balance of defenders. Even the famed Musketeers were actually household troops attached to a nobleman who were given the honor of defending their crown.
Oh my. Look at this ramble! LOL Sorry, you hit the button here, and got more than you wanted.