Of your examples, the one with less money is just less money. I understand issues with a drop in salary, but the reference to "junior position" above seemed to imply more than salary.
On the first, I've been older than my managers for years now. Who cares? I don't want to be a manager, I enjoy programming. I care deeply whether that 23-year-old is a good or bad manager, but that has nothing to do with how old she is.
If you're a professional, your rate is market or pro bono. Anything in-between just gets horrible. Your salary is what it costs the company for management to waste your time. If your salary's low, your time will be wasted.
In the sense of "meaning of life stuff" (fulfillment, meaning, purpose, etc). Your salary is what you charge someone to make you do things you wouldn't normally do. Sometimes, especially in "tech," jobs and natural interests align. In the normal world, that isn't always so.
If you're told your boss manager will be a 23 year old who was BFFs with the founders all growing up, and you are 35 with 15 years of experience, that's kinda degrading.
If you're a 30 year old with 10 years of experience and you're being offered less than what an undergrad gets entreating into facebook or apple or google ($30k sign on, $50k+ worth of 4-year options to start out with (which will easily be added to so you can cash out $500k to $1M within 6-8 years)), that's kinda degrading too.
Sometimes your specific experience doesn't match the outside world anymore. Maybe you have eight years experience using Custom Designed Internal Framework that's of no use to the outside world. So, there you sit, being judged along side people with eight years less experience than you because all your experience is "hidden" to the new company, their interview process, and your social peers.
There are many ways jobs and the interview process can make you feel less than stellar.