Only if the transfer switch doesn't do what it's supposed to. This switch is supposed to cut out gen power when the shore power comes on.
The "damage" would most likely be limited to the generator with the shore power trying to drive the generator as a motor while the motor is trying to drive it as a generator. It would probably break a shaft or a shear pin if so equipped. Of course there's always a chance that the gen will come on line in phase with the shore power, if which case you're feeding the grid but nothing bad happens.