The Extended Baryon Oscillation Spectroscopic Survey: Measuring the Cross-correlation between the Mg ii Flux Transmission Field and Quasars and Galaxies at z = 0.59