It may be caused by the asset preload headers set by Inertia. Together with other headers, they can exceed the default FastCGI buffer size of Nginx. You can try increasing the size in the http block in nginx.conf, e.g.
Why would your choice of session driver matter? Unless you use the cookie driver, it should make no difference whatsoever.
Nginx is telling you what's wrong: your backend (upstream) is sending response headers that are too big. Either increase the buffer size in Nginx or remove the AddLinkHeadersForPreloadedAssets middleware in Laravel. I don't recommend the latter if you care about performance.