I can't think of a way to use a T5 in early veg for 12 plants in 2 gal pots. A t5 can veg 12 plants in solo cups for a bit.. But without transplanting, I can't think of a way to make this work the way you want it to.
I transplant autos all the time. Like every grow, lol. I don't have issues. But I only keep them in there for a week or two max. I've transplanted from 1 gal pots as well. Those work a little better and the plant can stay in the one gal for a longer time frame.
Technically, you can fit 12 two gal pots in a 5x5. Would I recommended it for your first auto grow? Hellllss Noooo, lol. But hey, that's what experiments are for! My question is.. Since you plan on growing out 12 autos in a 5x5, you obviously have a bigger light somewhere that you plan to use in late veg and flower when they are in the 2 gal pots.. Why not use that light? That way you can stick to your plan of not transplanting.