The contents of the ballot can still remain anonymous.
You create a plaintext ballot, then you encrypt the ballot with the election authorities' keys, then you sign your encrypted ballot with your own private key (then you send the ballot to the server).
You are signing a ballot that is already encrypted.