Since Medium provides the same AC as Light, why would you assume different Dex scores?
Because the benefit of medium armor is that you don’t need to invest as much in DEX to have the same AC (if you take disadvantage on Stealth checks) thereby being able to invest in other abilities. If you’re wearing medium armor, there’s no benefit to AC in having a DEX above 14.
Before the availability of half plate (6th level), if your DEX is 18 or higher, you should wear studded leather unless you also have a STR 15 or higher and heavy armor proficiency. Once you can afford half plate, if your DEX is 20, you’re better off wearing studded leather unless your STR is 15 or higher, and you have heavy armor proficiency.
If the light armor guy starts at 16, just start the medium armor guy at 16, or at least 14. They're not likely starting 12 given the classes involved - 14 seems somewhat likely to me given the skills and initiative and saving throw involved with Dex.
The classes involved are barbarian, cleric, druid, and ranger. Ranger is the odd man out. A DEX-primary ranger should wear light armor, so medium armor proficiency is included only to enable STR-primary rangers. A STR ranger is still going to want a high DEX, though, so will probably max out his/her medium armor at 1st level. As s/he increases his/her DEX to 18 and above at higher levels, s/he may end up adopting light armor.
That leaves barbarian, cleric, and druid. Typically, none of these classes are going to have DEX higher than 3rd or 4th in importance. I’m assuming a starting array with the numbers 16, 14, 13, 12, 10, 8, which would give these characters a 13 or 12 in DEX at best. What am I missing?
Also, if we're assuming an ASI, why wouldn't the Medium armor guy just take the medium armor mastery. Their 16 Dex and a feat is now a higher AC that the 18 Dex guy in light armor...or even the 20 Dex guy in light armor.
Feats aren’t part of the base game, which is what I’m focused on, so my analysis doesn’t account for them.