A pretty simple out-of-universe explanation is that it uses roughly the same technology as the holodeck. It's already a technology that exists on the Enterprise, and the viewscreen wouldn't have to really be as complicated since nobody has to interact with it physically.