Exponential global attractors for semigroups in metric spaces with applications to differential equations