We consider the family known as modified or generalized surface quasi-geostrophic equations (mSQG) consisting of the classical inviscid surface quasi-geostrophic (SQG) equation together with a family of regularized active scalars given by introducing a smoothing operator of nonzero but possibly arbitrarily small degree. This family naturally interpolates between the 2D Euler equation and the SQG equation. For this family of equations we construct an invariant measure on a rough $L^2$-based Sobolev space and establish the existence of solutions of arbitrarily large lifespan for initial data in a set of full measure in the rough Sobolev space.