Polarized period map for generalized $K3$ surfaces and the moduli of Einstein metrics