Should a military Galaxy-class cruiser also carry large troop barracks?
Short answerNo; troop transport and front-line combat should be separated so embarked soldiers are not trapped aboard a ship expected to keep fighting.
NotesThe alternate Enterprise-D in Yesterday's Enterprise combines a military cruiser with troop barracks. That is a poor arrangement when the cruiser must remain in combat while its passengers need to land. A dedicated troopship can deliver troops and withdraw. Keeping troop transport separate avoids tying that movement to the fighting ship's mission.