Ab initio multireference in-medium similarity renormalization group calculations of even calcium and nickel isotopes