Name recognition can be a powerful thing, both for your PI and your school.
Within the narrow field in which your PI is well known, being associated with them will be more important than which school you're at.
If you branch out after grad school into a new field, your former PI becomes less important (unless they're super famous/a Nobel prize winner).
In both cases, your personal contributions (ie: papers published) and your recommendation letter will have the most weight by far.
But...how much weight? That depends on what you do. If you leave academia, your PI's name recognition will probably take a back seat to your school's name. If you leave your field entirely (and go into IP law or technical writing or policy), then your school's name might ultimately become more important than even your publication record.
But the most important thing is the fit
Seriously, it sounds trite, but if you want any of the work to mean anything, you must be successful in grad school. That means publishing and graduating. So, a new PI will need you to publish so they can get grants/tenure. This could mean a lot of pressure on you! They also might not have a ton of resources/collaborators yet, so that could be more work for you to find what you need (but great training!). With an established PI there will likely be less pressure to publish but more resources available with which to do it.
Finally, there's the personality fit. This is not trivial. You'll need to work with this person for the next ~5+ years. You must be able to work with them!