Commutators of multiparameter flag singular integrals and applications