I got some good advice about a decade ago, which I've used for guidance and, on reflection, has served me well. You're not well-positioned to understand the core nature of problems, and which are most important, from the outside. Until you have this clarity, do what you can to become part of the core community driving the thinking in your field of choice. There's a strong case for the social importance of many problems in energy and AI, and likely enough there are problems that would interest you in healthcare. So my answer is to not worry so much about which field you dive into, and focus more on trying to get to the center.
As someone who has been orbiting two poles of education and CS for my whole career, I'd also suggest reflecting on why energy and AI are currently more attractive to you than healthcare. There doesn't have to be a reason, but sometimes I feel like the attraction of pure science fields is that they don't involve the messy human issues that come with social science, like identity and culture, power and your own positionality.