A few years ago I was in an airline crew room in the US, on the notice board there was a multitude of business cards and advertisements for businesses that the pilots were running or involved in. With furloughs, and pension plans decimated as a result of mergers or bankruptcy protection and restructuring, they knew how unreliable their finances were.
When you add in that your career is dependant on passing your medical as well, you realise how insecure your income is. Having a wife with a well paid job in a different field such, as law or medicine is good insurance but for most of us a substantial financial buffer needs to be built up in the good times and financial security achieved asap.
Taking on a loan for flying training, with the aim of paying it back from airline earnings later on isn't a good idea. Join the airforce or fly for fun.