Angular momentum evolution of galaxies over the past 10 Gyr: a MUSE and KMOS dynamical survey of 400 star-forming galaxies from z = 0.3 to 1.7