I always find it interesting to see how very common words have changed over time–and mean is certainly one that has shifted around quite a bit!
I’m going to focus solely on the adjective version of the word today, though it’s worth noting that through the years, some of the changes to mean‘s meaning (ha…ha…ha) is because of it’s noun definition (“that which is in the middle or between extremes”–a definition mostly retained these days in math).
When mean first entered the English language back in 1200 (you know…when the English language first entered the English language), it meant “of low quality; common to all.” Within a hundred years there was a subtle shift to “inferior, second-rate.” This was of things–think of the second verse of “What Child Is This?”: “why lies he in such mean estate…?”–but it came from an application to people that had arisen earlier in the 1300s, that of a low or inferior rank.
The word carried these meanings of “common” or “inferior” for quite a while. In the 1660s, it took a bit of a turn and started to mean “stingy, nasty.”
So when did our main meaning today (“not obliging, pettily offensive”) come into play? Interestingly, not until 1839, and it was American slang. The inverted meaning of “remarkable good” (think, “She plays a mean piano”) is from about 1900, probably a shortened form of “no mean _____”)
(Four days left as of when I’m publishing this)