When the Pixel 7 comes out, how quickly will GrapheneOS come out with a version compatible with it
No one can know for sure. Might be weeks or months, depending on the developers availability, and the hardware itself. While leaks suggest it might reuse ARMv8.2 cores, it could be an ARMv9 device and that means MTE support should be added to the hardened memory allocator. There could be other "unexpected" things as well.
Since the Pixel 6 was a quite different device from the previous generations, it took a bit longer for it to get its first stable release along with having most of the hardening ported over to it. We expect the 6a won't be hard to support since it will be very close to the Pixel 6 internally, but given the ongoing efforts to prepare the project for the Android 13 migration, it might take longer than you would expect.
Back to Pixel 7, we won't know for sure before the device gets released.
How long will GrapheneOS keep the new device supported (I know that the planned support for Pixel 6 is 5 years, so I'm hoping for something similar).
As long as the OEM supports the device, GrapheneOS should support it. Currently, extended updates are being offered for some older generation Pixels (3rd gen atm), which consist of OS updates to ease the transition to a newer generation device. Note that extended updates do not ship firmware updates since those aren't provided by the OEM anymore, therefore the device is at risk. Extended updates are strictly for harm reduction and shouldn't be seen as a way to extend the longevity of the device. It might not even make sense to do that from 6th gen onwards.
Pixel 7 will probably be very similar to Pixel 6 in that regard.