Polar molecules are an emerging platform for quantum technologies based on their long-range electric dipole-dipole interactions, which open new possibilities for quantum information processing and the quantum simulation of strongly correlated systems. Here, we use magnetic and microwave fields to design a fast entangling gate with $>0.999$ fidelity and which is robust with respect to fluctuations in the trapping and control fields and to small thermal excitations. These results establish the feasibility to build a scalable quantum processor with a broad range of molecular species in optical-lattice and optical-tweezers setups.