Yes, I think the shortcomings are twofold.
First of all, there's inadequate research evidence about the effectiveness of treatment of non-cancer pain, especially with opiates. That's an area that needs to be looked at in a more in-depth and scientific way.
Second, you are absolutely correct when you say that physicians receive very little formal training when it comes to pharmaceuticals and when it comes to prescribing, and when it comes to prescribing opiates in particular. During their medical school training and residency, there are very few hours spent on that subject.
It's often learned as we go. After we are licensed, there's no requirement to learn anything more. This might be the benefit of looking at some sort of an exemption system, such as we have for methadone, in that in order to get that exemption and be allowed to prescribe high doses of opiates, you would have to show some evidence of training and knowledge in order to be able to practise in that way.