A former Air Canada pilot is accused of flying thousands of passengers on commercial flights without a proper licence for 17 years, officials say.