The classes being taken by two houses at a time doesn't result in a large number of students – that would mean that the students multiply by taking classes with other houses. If anything, it means that the teachers have less hours per week. And when you think about it – they have 2x5 lessons (five years, two houses per lesson) and then 1x2, that's twelve lessons a week if they ONLY had one lesson of each subject with each year per week. But assuming that they have double periods, or that they have Transfiguration on Mondays and Wednesdays, that gives McGonagall 24 lessons a week that she needs to teach, plus HoH duties and so on. And that's only if we assume that they share all their classes with another house. If they don't, then that makes 48 lessons per week, and I'm not sure they can do that to their teachers. So if anything, I'd guess that they share classes not because there are so many students, but because the teachers otherwise would just have too much work to do.