Is there an in-universe explanation of how a relatively small room can be used to create an apparently infinite (or at least very large) amount of space, one in which two people can be spatially vast distances from each other?
2 Answers
According to "Star Trek: The Next Generation Technical Manual", the answer is essentially force fields that act as treadmills and holographic imaging.
All the detailed in-universe technobabble you could possibly want can be found here, pages 156 and 157.
The very first time one is shown, it is described how the Holodeck spreads distant objects Trompe-l'œil across the walls. The effect is exactly the same as this, only for multiple people (and eyes) at the same time and without glasses.