I was just going to post something along these lines: from what I've read, the aviation industry's possible "pilot shortage," actually translates to "airlines don't want to pay the market rate, or pay enough to encourage people to become pilots."
Which is usually the case in industries that claim a shortage of workers.
It's not the airline's fault if the pilot's union is optimizing for senior pilots' salarys.
In total Airlines pay pilots plenty, too much even. The issue is that unions have distorted the allocation. A fresh pilot will graduate with considerable debt yet garner a wage far below their economic value. Once they become senior they've "earned" the higher distorted wage. They may even still carry student debt. The situation thus becomes re-enforcing.
Which is usually the case in industries that claim a shortage of workers.