What are the drawbacks (if any) of using a 4-gallon batch with a 5-gallon kegging system? And what if the batch is only two gallons?
Go for it. There's no harm as long as you purge the keg of it's air, replacing it with CO2. At some point, every keg of beer has only two gallons in it. Whether it's right at the start or if it's after 3 gallons have been consumed makes no difference. If you don't purge the keg of air though, your beer will become oxidized.
To purge, prior to racking your beer into the keg, hook up the gas-in line set to about 3psi and open the bleeder valve. Let it run for about 30 seconds. Then depressurize, remove the lid, and rack your beer into it. After you put the lid back on, pressurize to your desired psi to meet your volumes of CO2 target, bleed off the gas, pressurize, bleed, etc. for four bleed-offs.