it is very unlikely that p=np, but if it is, there's precious little we can do. technically generating massive keys with quantum key distribution and then using one-time pad could safeguard data in transit, but at rest it's practically impossible to guard.
the more likely scenario is that ai breaks some primitive that doesn't break p=np, just finds a flaw in that particular algorithm. you can protect against that with multi-primitive schemes that ensure that if any single primitive breaks, your data is still safe.
post-quantum crypto is designed against a specific attack vector and this isn't it, but it does actually het implemented through multi-primitive schemes in the real world, so it does get you some coincidental protection.