Toward a Robust and Generalizable Metamaterial Foundation Model