Anyone needs more than 256 Terabytes of RAM?
In any case, I'd be quite surprised to see a 64-bit CPU doing such heavy lifting in 2040.
I can't imagine anyone needing more than 4PB in the next 30 years, and the security gains now is (in my opinion) worth the potential refactoring in 30+ years that would be required.
Even so, it wouldn't be that hard to actually build a system that could in theory try and map 4PB of storage via mmap today, its about 1/2 a rack of fairly common equipment. Given there are various companies selling 50T ssd (https://www.anandtech.com/show/11639/viking-ships-uhcsilo-ss...) its probably possible to do it in under 10U.
Intel added support for 5-level page tables (bumping virtual memory to 2^57 bytes) a few years ago: https://en.wikipedia.org/wiki/Intel_5-level_paging.
EDIT: My math is bad, see comments below.
I can unsarcastically say that no one will ever need full 64bit addresses on this planet.
2^71 bits - total hard drive capacity shipped in 2016 [0]
I doubt your calculations.
[0] https://en.wikipedia.org/wiki/Orders_of_magnitude_(data)