I served in the military myself and if I had a commanding officer like that, he would have heard from me too. In fact, I've done it before. I had a first sergeant who stepped way out of line by telling a young soldier who had a different faith that he "needed to be saved." When the other young soldiers saw our first sergeant getting away with it, they started persecuting this kid too. It was wrong. I knew it was wrong so I reminded him his behavior was inappropriate.
Without knowing the specifics of that situation, there's a big difference between fighting over personnel assignments or duty-shift rotations and singling someone out over religious affiliation. If Jellico had told Riker that he was going to hell because he couldn't convince the department heads to switch to a four-shift rotation, I'd agree that his behavior was inappropriate. But that's not what happened.
Jellico told Riker what he wanted done (minus the confusion about the probe), and although Riker initially handled it appropriately by taking his concerns to Jellico, he made the mistake of allowing his personal feelings to get in the way of his duty when he screamed at the captain in front of other senior officers. That's
what I have a problem with. Riker should have waited for a more opportune moment to voice his concerns. Whatever Jellico's shortcomings may have been, he didn't deserve to be humiliated anymore than Riker deserved it when Jellico questioned his initiative or told him that he didn't want to discuss the duty roster.