Making the most of having two group affiliations
When the two PIs are at different universities, you could perform your thesis as a double degree (something I did myself), assuming that both universities allow this. One aspect that needs to be taken into account is that if you do so, you need to adhere to the regulations of both institutions, which sometime leads to conflicting requirements. Also you need to align with the bureaucracies of both institutions, which certainly results in some overhead for you.

Anyway, even when the PIs are at the same institution, you can profit from their (hopefully somewhat complementary) expertise. Also you will have a larger network. You will need to balance your time between both research groups, and align their feedback, which is a potential pitfall, but also a learning opportunity.