Below is a pretty good summary. The events of what pilots call the lost decade enabled managements to slash pay, benefits and retirement to the bone. This caused a huge reduction in pilots entering the training pipeline. Airline managements were warned repeatedly what was happening and that they would face shortages down the road but they failed to heed the warnings. Regional airline pay was particularly heinous with most copilots qualifying for food stamps and other aid making 15 to 22,000 a year. Candidates were not willing to obtain a 4 year degree, spend years and a lot of money obtaining the required ratings for the pay levels offered. Worldwide travel is booming and pilot demand soaring. Foreign airlines are aggressively recruiting US pilots at very high salaries. The regional airline industry in the US still pays very low wages. After 3 years a regional copilot can expect to make 45,000 a year spending 16 to 20 days a month away from home. This is a good article on the situation. Things are expected to enter the critical timeframe from 2020 to 2030 when retirements soar.

https://www.cnn.com/travel/article/airline-pilot-shortage-united-states/index.html