MRI tends to be one of those multi-disciplinary fields drawing on physics, engineering and of course a host of fields like neuroscience, medicine, psychology... more or less any field where it has a direct application. So you are right that you have to really pay attention to what you're signing up for. It is quite possible that you won't end up with a PhD in physics and if your ultimate goal is an academic position in a physics department then it will be almost impossible to get hired without a PhD in physics.
But from another perspective, going into medical physics/MRI actually opens a lot more doors than it closes. My reasoning is that such a route gives you some directly marketable skills. So when you finish (depending on the program), you'll be qualified for some clinical or hybrid clinical-research positions and those tend to come with a steady income and more job stability than the post-doc to tenure-track race.
Remember that in aiming for that latter route, you tend to end up competing with all the other sub-fields of physics for fewer jobs. And unfortunately most physics PhDs end up not doing that for a career anyway.
On the other hand, a lot of clinical scientists end up with adjunct appointments to universities. They can teach courses, take on graduate students, lead research projects... but balanced with clinical responsibilities.
So when selecting a graduate program, one of the big things to pay attention to is where their graduates are ending up. That's not a guarantee of anything. But it's a major flag if none of them are ending up in a place you'd be happy with.