I have a dataflow job that reads from pubsub, transforms the PubsubMessage into a TableRow and writes this row to BQ using the FILE_LOAD-method (each 10 minutes, 1 shard). The job sometimes throws a ByteString would be too long-exception. This exception should be thrown when it concats the rows to the Google Cloud Storage (GCS) temp file as you cannot append to a GCS file. If I understand it correctly, it is ok to let this exception happen as the 'large' temp file will be used for loaded to BQ later on and appending will happen to a new file which should succeeded. I would however like to prevent this error from happening without increasing the number of load jobs as I'm getting close to my daily load jobs quota on the project.
Can I:

increase the number of shards to 2? Or will that cause the writer to always use 2 shards even if it only needs to write a small number of rows?
use setMaxFileSize() along with the number of shards? Or will the writer still use 2 shards even if it doesn't really have too? 

Thanks in advance!
Setting the number of shards to 2 will always use 2 shards.
However, I don't think the "ByteString would be too long" error is coming from GCS.  That error usually happens when the total output size of a bundle in Dataflow is too large (>2GB), which can happen when a DoFn's output is much larger than its input.
One option to work around this would be to break apart the bundles coming in from Pubsub with a GroupByKey.  You can use a hash of the input or a random number as the key, and set your trigger to AfterPane.elementCountAtLeast(1) to allow elements to be output as soon as they arrive.
BigqueryIO file loads: only use additional shard if required