The Moon’s daytime is half a month long and can reach 120 C so we’d need some pretty powerful heat shielding. And there’s no ozone layer to protect the electronics from radiation, and I’m pretty sure the Moon orbits outside of Earth’s magnetosphere. And the shielding used for such a project could also be used to fix climate change here (and terraform Venus later) with orbital parasols. And whatever unimaginable technology we’d need for such an ambitious project may as well be used to run a grid of electromagnets and power lines across Mars to give it a magnetic field
Most proposals for moon colonies are either built underground or covered up with a thick layer of regolith for both of the reasons you mentioned. It’s very likely a collider would also be built underground for the same reasons. Digging a many-miles-long tunnel on the moon with the awful properties of moon regolith to deal with would have its own set of challenges though.
Yeah. I hear NASA and India are planning to send 3d-printer robots to lava caves to seal them off, cover/get rid of all moon dust and build permanent bases there (but as of now the priority seems to be researching the polar water-ice and using moon rocks to study what the early solar system’s geology was like)