The details of how warp drive operated were not fully realized by the time Star Trek: The Next Generation went into production. It was Rick Sternbach who decided that main engineering was where the matter/antimatter reaction needed for faster-than-light space travel would form.
The vertical warp core had already been introduced in Star Trek: The Motion Picture. The thinking at the time was that the antimatter would be in a magnetic containment at the bottom of the engineering hull, sending antimatter up into the reaction chamber.
The shaft above engineering, however, did not make sense. There was no place where the “matter” was coming from.
Sternbach solved this problem by placing deuterium tanks at the top of the Enterprise-D’s warp core, which provided the necessary matter.
“When the time came to do TNG, Mike Okuda and I sat down over many pizzas and bowls of noodles to compile and clarify all of the information we had on impulse, warp, power generation and so on,” Sternbach told Forgotten Trek in 2007.
The Original Series touched on many of these concepts but wasn’t clear or consistent, so we wrote a lot of memos which eventually became the TNG Technical Manual.
The engineering set was a redress of The Motion Picture’s on Paramount’s Stage 9. Construction had originally begun in 1977 for the aborted second Star Trek television series, Phase II. Mike Minor had designed the set for Phase II, Harold Michelson updated it for The Motion Picture.
The structural elements of the second floor were kept intact for The Next Generation. The rest of the set was rebuilt. It was given an open floor plan, with several corridors providing access to the room.
Light fixtures were added to either side of the master systems display midway through the first season. The display itself changed from green to blue in Season 3.
The “pool table” was introduced in “No Where No One Has Gone Before”. Early in the episode, the main corridor passing through the set was still half-open. Toward the end, the same doorframe is walled off with a console. It would be permanently blocked from Season 2 onward.
The entire area was frequently redressed as a large corridor junction to allow for longer walking scenes.
The set was redressed again to become the engine room of Voyager. A separate engineering set was built for Star Trek: First Contact, but it reused the warp core of The Next Generation.