If you are using different loaders, as posted in your initial code, then yes, each loader can use different input shapes and batch sizes.
If you concatenate the dataset and use a single loader, the batch size would be set in the DataLoader creation unless you disable automatic batching and customize the loading pipeline.