If you're able to boot into Recovery (Power + Volume Down), and the 'phone remains stable enough, you could try applying a Rescue OTA to your Pixel 2 (instructions courtesy of Techno Bill) that will overwrite the system files without wiping your device. A Rescue OTA will bring the 'phone back up to date with the latest OS version but cannot be used to revert to an earlier version.
Applying a ROTA has helped others in the past who have received the 'corrupt' message and I hope it will help you too.