With the greatest of respect, like most of the arguments one reads about "shortages" of Doctors, Engineers, tradesman etc.
The problem is not a shortage of pilots at all. It is a shortage of pilots prepared to work for the pay offered.
I can think of many bright young people who might like a flying career....but when they compare lifestyle, risks and personal cost against the rewards....they decide on other careers instead.
To put it another way, it is a shortage of pilots prepared to work for peanuts, under continuously deteriorating employment conditions.