How is non-integer upres downres (1080p game on a 1440p screen etc) calculated
Assuming modern 3D games here.
most games you are aware of are not fixed-resolution – there's very rarely a 1080p game these days! The GPU only renders things onto a buffer the size of your screen's resolution when asked to (in the last step of the processing chain, basically), so games can simply have a fully relative-coordinate-system going on till the end.
So, the answer is: I bet what you think is a 1080p game isn't. Other than that, the physical dimension of the screen make absolutely no difference to the image generation – it's only the last step, where, no matter what the output resolution is, an operation is applied to get pixel values out of a 3D scene definition, consisting of polygons in a 3D coordinate system that has nothing to do with pixels.
You of course need to use appropriately many polygons for high resolutions; the textures you map onto these (and thus, things like static elements, menus etc) need to be right for the rendered resolution etc.
But: there's nothing &quot;special&quot; about the resolution; in any case, there's a projection from one coordinate system to the screen coordinate system (pixels) in a last (or close to last) step.

You could still interpolate the 1080p pixel values based on a 1440p rendered image, but intuitively, this seems like a huge disadvantage, but when you do this in practice, the image indeed looks better than when you have 100% render scale where every displayed pixel has a 1:1 correspondence to the rendered image.

That very much depends on the game you're looking at. In effect, shrinking with an appropriate scaling algorithm is a form of antialiasing setting. That's probably what you perceive as quality advantage: smoother edges.

If I rendered 2160p and displayed this on a 1080p screen, you could average every 2x2 pixels and display it on a single pixel

This should not be done (and rarely if ever is done today); it's a bad way of downscaling things. Signal theory tells us that when filtering with a boxcar filter (in this case, 2 samples wide) in spatial domain, you get ringing, and things look jagged.
GPUs have scalers, but even as simple shader, better scaling algorithms are easy to code.