The presence of $d$ orbitals can indeed provide a means for otherwise closed-shell atoms of alkaline-earth metals to accept electrons. Wu et al. [1] describe carbonyl complexes of Ca, Sr, and Ba in which the valence $d$ orbitals of these metal atoms are indeed engaged in (covalent) bonding.
In principle, all atoms actually have $d$ orbitals. Getting them to accept electrons in the ground state, however, is a different matter. With two units of orbital angular momentum and thus at least two nodes (corresponding to a principal quantum number of at least 3), all such orbitals are relatively high in energy and require a relatively deep potential well to make a bound state with the additional electrons. With 20 positive charges in the nucleus in a calcium atom the well is deep enough as the $3s$ and $3p$ orbitals privide only partial shielding from the nuclear charge. Magnesium with only 12 positive nuclear charges does not get there. It does have $3s$ electrons and perhaps bonding with $3p$ orbitals, these orbitals having two total nodes in a magnesium atom; but these have less angular momentum than the $3d$ orbitals we seek to occupy.
References
1.
X. Wu, L. Zhao, J. Jin, G. Wang, M. Zhou, G. Frenking, "Observation of alkaline earth complexes M(CO)8 (M = Ca, Sr, or Ba) that mimic transition metals", Science 31 Aug 2018: Vol. 361, Issue 6405, pp. 912-916.
DOI: 10.1126/science.aau0839