Interplay between angular momentum transfer and nuclear structure in the production of isomers at intermediate energies