I think the most important thing is a purpose.
All of the ingredients mentioned so far are important - non-flat NPCs, interesting PCs (whatever interesting means for your group), enriched settings (but not so many details that the players become bored listening to it all), a plot arc (with some semblance of planning). The note about random encounters touches on my thoughts here - random encounters are bad when they lack a point. If it's an encounter just to have an encounter, then it's not contributing to the adventure and so it is, quite literally, wasting everyone's time**.
The adventure needs to have a purpose. This will drives the players to engage with it and helps the GM run things well in the background. Like a good story, every encounter and every step along the adventure path should move the adventure closer to the final outcome, advancing it towards its purpose.
**As an aside, I think it's very challenging to have RANDOM encounters which are not, ultimately, going to harm the quality of the adventure. So, when speaking with new GM's I often advocate planning all encounters. Random encounters can be done well (ie/ when the random table is composed by the GM of encounters that each could have a point OR when the GM is good at free-wheeling a random encounter result and incorporating it into a larger story), but doing them well is a skill and requires effort.