Whose fault is it when you are in a ditch with your flashers on and get hit in the rear by another car?

Most likely it is the other person's fault. You were not moving and therefore cannot do anything to avoid the accident. The other party is the only one that could take any action to prohibit the collision.