If you want to research and teach, then I assume you want to be in an academic or university setting. Depending on where you are, research and teaching don't necessarily mean a good lifestyle. It's not like you just casually do some cancer "research" here and there, not if you want to do good research, move up the academic ladder, and all that stuff.
I think you can have a good lifestyle in any IM subspecialty, or just general IM, not just those four. Even in cardiology and pulm/ccm which are usually the ones considered to have the worst lifestyles. You will just have to tradeoff not making that much money. Or you will have to set up your practice the right way and have your partners agree. For example, in pulm/ccm you can do mostly outpatient pulm for a good lifestyle. Actually pulm only is not a bad choice if you only care about lifestyle. The ICU is hard though.
I think Allergy and Immunology, Rheumatology, and Endocrinology can all eventually reach $275K-$300K with a decent lifestyle, unless you want to work in someplace like California or NYC. These three probably do have the best lifestyle (almost all outpatient, regular hours, few emergencies, minimal call, etc.). Hematology/Oncology can eventually reach $400K or more with a decent lifestyle, unless you want to live in a place like NYC, but depending on your personality it might be difficult to deal with cancer patients, there's probably more of a call burden than the other three.