A variational framework for the modeling of glassy polymers under finite strains