In Pen Pals, I believe the writers misinterpreted it as a directive not to save entire civilizations from natural disasters based on the specious logic that one of them might become the next Hitler.
I've never gotten that interpretation from Pen Pals, and the big scene where the officers debate aspects of the PD doesn't even work the way it should because the concept is too inherently vague. The potential issue with Data's actions, in my view, is what would happen if Sarjenka's people had learned of her contact and promptly came to expect that the Enterprise (and by extension, the Federation) would be obligated to help them? What if their reaction caused a panic since the ship would have had only limited capacity if it had wanted to intervene, and probably couldn't have adequately supported the whole planetary population. I think there is a fair argument to be made that good intentions can be misread and cause more harm than was expected, and so a certain amount of caution is warranted.
I'm also not convinced that merely having a similar level of advancement is a guarantee that the Federation will assist. When the Klingon civil war erupted and Gowron asked Picard for help, citing the terms of the alliance and his status as leader under Klingon law, he was declined on the grounds that the war was considered an internal affair of the Klingon government. Even though the outcome was clearly important to the Federation, Picard knew that merely charging in wasn't the best alternative.