The uncertain nature is really for all employment. A lot of people, business people, politicians, scientists, economists etc are saying the advances in AI and automation that will occur over the next few decades will be so immense and exponential that there will be an employment crisis. There simply won’t be nearly enough jobs to go around for all those who are willing and able to work. The nature of employment overall will change dramatically and a lot of societal norms will change.
Economists said the same thing in the 1920's and look what happened. Everyone ended up working more despite huge productivity changes due to technology.
Given airlines are reluctant to pay for changes in technology (think 737) I fail to see how the enormous infrastructure build and the complete rewrite of the regulations that would be required for AI would be justified.
There will still be pilots into the future whether it is worth the time and effort required will be the question. On that count I personally would suggest it is not a good career choice.
In reality AI is a problem looking for a solution, given how low the current accident rate is I suspect that AI will just create a whole host of problems that currently don't exist under the current Human/Machine arrangement.