Effective Dynamics and Transition Pathways from Koopman-Inspired Neural Learning of Collective Variables