Generally speaking you can do this.
The only place where you might run into trouble would be if you were using some of the more esoteric features on an EX3200/4200 that the EX2200 cannot do.
For example, suppose that you had some OSPF setup on your EX3200/4200 switches that required an advanced license on the EX2200.
Otherwise you should be able to build a base configuration for a 24-port 2200/3200/4200 and a base configuration for a 48-port 2200/3200/4200 as JUNOS is JUNOS.