I agree with SplenoMegastar. I generally don't advise anyone to work for two PIs. Doing so makes you the child of divorced parents. You need to please both, any disputes are settled with you as a go between, and often the parents get jealous of you if you spend too much time with the other. Even if the arrangements are very clear in the beginning, these relationships often get too murky with time. Pick one PI and that's your PI, for better or for worse.
Can PI-B join the engineering department as an adjunct? This often happens here in these cases. Otherwise, is PI-A okay with sponsoring you officially but not having you in their lab? It sounds like you want to be working for PI-B. But if you are officially sponsored by PI-A or co-sponsored by PI-A, they may heavily pressure you to do experiments for them. So you need to commit either way to one PI. It sounds like you want to work with PI-B, so find the arrangement that most allows you to be that PI's student while not picking up additional requirements. Another option is: can you switch departments yourself and have the other department recognize your coursework?
You can't be the first student (probably not in the first dozen) who has had this issue. Try to see how other students at your program have handled it. The graduate program advisors and/or MD/PhD advisors should have helpful advice for you. Just put it through the MD/PhD filter. i.e. The advising given by my graduate groups (I switched twice...) was often lousy or not applicable to MD/PhDs.