Uh, I'm not an economist, but what you said doesn't make much sense to me -- isn't "the market clearing price" effectively the same as "people are paid the value of their work"? If the value that a software engineer can potentially produce is lower, then wouldn't the corresponding market clearing price would simply be lower for that person?
Maybe in a world where every software engineer is genetically engineered to have the same output then what you said about market efficiency would make sense, but this isn't that world.
The thing you said about price discrimination is not even related to what the OP said, and you simplified the problem a lot by reducing the problem simple monetary terms. The example you gave about expats is particularly flawed, because it's not unusual that expats are paid more for other values that they bring outside of the work they perform (for instance, academic institutions think of that as prestige in some Asian countries). We were all born unequal, if the market were so efficient there wouldn't be so many unjust things happening around the world.
Maybe in a world where every software engineer is genetically engineered to have the same output then what you said about market efficiency would make sense, but this isn't that world.
The thing you said about price discrimination is not even related to what the OP said, and you simplified the problem a lot by reducing the problem simple monetary terms. The example you gave about expats is particularly flawed, because it's not unusual that expats are paid more for other values that they bring outside of the work they perform (for instance, academic institutions think of that as prestige in some Asian countries). We were all born unequal, if the market were so efficient there wouldn't be so many unjust things happening around the world.