Would pine or MDF baseboard better handle humidity fluctuation?
MDF may be marginally more stable, but in my extensive experience it's far too fragile to be used for house trim. I wouldn't install it if it was free. It dents and scratches like nothing.

If you're doing a typical bedroom you shouldn't have field joints, as either is available in 16-foot lengths. Even if you do, a well-glued and well-nailed miter won't come open.

If you do the corner copes well (and I did say copes--don't miter inside corners), and if you pre-tension them a bit (cut a sixteenth to an eighth long and flex the center in), and if you use a good wood glue at the joints, you shouldn't have winter gapping. 

If you really want to be sure, use oak. There's no rule that says oak can't be painted. The cost difference is often negligible between red oak and clear pine.