Not a pediatrician, but one of his nurses...
As a boy between the ages of 6 and 10 or so, I felt embarrassed: (1) by being naked from the waist down in front of the one of the nurses at our local clinic; (2) by the fact that she was the one who opened my pants and pulled them down (instead of asking me to do it), and (3) for injections, the length of time she kept me that way... with both my bare penis and hips in her full view.
Even then, especially in the case of a rectal temperature, with me lying on the table and crackling paper, it seemed like it would have made more sense to ask me to lower my own pants.
The way I remember it, I would be lying on my back, and the nurse would say, "I need to take your temperature." Her fingertips would go to my belt, unbuckle it, unzip me, and open my pants. Then, she'd ask me to turn onto my tummy. I'd comply, again to a crackle of the paper and a jingle from my belt (I'd move the buckle out of the way.) The nurse would tug on on my pants, slide them down, and then pull down my underwear to past my hips.
At the time, though I was embarrassed, I did like her hand on my hip, and the feeling of the Vaseline on my anus before the thermometer slid in.
With shots, I was usually standing, and this nurse would likewise unbuckle me (reaching around me to do this), unzip me, open up my pants and pull them down, and then slide my briefs down all the way to my knees. If I had on a shirt with tails, she'd lift it and have me hold it in place with my underarms.
So I would be standing there with my little bare cock and scrotum hanging out, and the cold air on my bottom, with the florescent lights humming overhead. It seemed to take forever.
And I would wonder why my penis had to be out. Why couldn't she just strip my pants down in back?
I also remember a few times, when I got a shot in the front, with the nurse having me lie on my back in the table, opening and sliding down my pants and my underwear ("Raise up...") until they were past my hips and penis, then giving me the injection in the crease between my lower belly and my thigh.
When I was younger, Mom would still be in the room while this was happening. As I got closer to 9 or 10, the nurse usually suggested that Mom leave the room, before she stripped me, and I'm not sure if that made me feel better or worse.
Each time, the nurse would take her time getting the alcohol and swabbing one of my hips, preparing the syringe, leaning in, "a little pinch, now," and giving me the injection... then leave me standing like that for a while as she disposed of the needle. She was in no hurry to tell me she was done, or that I could (finally) pull my pants up.
At the time, it did feel a little weird that this woman had the authority to take my clothes off and look at basically everything I'd been told I should not show anyone... and then keep me naked for such a long time. I felt like I didn't have any more say in this, than a baby would have. (The Playboy magazines I'd been sneaking a look at had made it clear to me that people sometimes stripped someone naked to humiliate them, and to feel power over that person.)
It didn't occur to me until years later that for that nurse, feeling "in control" might not have been the only reason that she liked to take boys' pants down... that she might actually have enjoyed what she was doing, for other reasons.