Page dimensions are not limited by the format itself. However, Adobe Acrobat imposes a limit of 15 million in by 15 million in, or 225 trillion in2 (145,161 km2). 👀
Why the heck is it constrained in inches? If I open a pdf on two screens of different sizes, with the zoom at 100%, will the features be the same size or not?
Because Acrobat is designed for the ancient ritual of “printing” which used rectangular pieces of pressed plant fibre that didn’t even have any pixels and needed to be measured with sticks with lines on them.
A pdf is a piece of paper you can't fold. So zooming or using a different resolution monitor would be like holding a magnifying glass up to a piece of paper but not a copy. They're still the same size one just looks bigger.
Comedy fact podcast No Such Thing As A Fish recently did an episode where they talked about how the largest PDF allowed by Adobe Acrobat is bigger than Belgium.