The inverse Galois problem for del Pezzo surfaces of degree 1 and algebraic K3 surfaces