Given the uncertainty of lunar surface "flatness" at the time of landing, how did NASA ensure that the axis will be vertical within 12 degree? Was any specific mechanism provided to ensure this? Or was it a calculated risk and optimism?
Calculated risk and optimism, mostly. The landing sites had been surveyed from orbit and promising flat-looking ...
Windows are kept small because they are heavy
Windows need to be thick enough to survive micrometeoroid impacts and the stresses of spaceflight, and to provide radiation protection. They also need cushioning and seals. This makes a window heavier than the equivalent area of sheet metal bulkhead.
The Shuttle needed just the delta-v to get into low Earth ...
The space shuttles, had a viewing window much similar in looks […] like the cockpit of a plane.
The Space Shuttles were planes. The others weren't. Hence it makes sense to have airplane-like windows, and it makes sense that the others don't need them.
The vehicles had different requirements.
The CM splashed down in the ocean, the LM landed vertically on the moon, the shuttle landed on a runway.
Requirements drive design.
See also Do windows in space stations, the space shuttle, other spacecraft have practical usage?