Was driving at speed and the ESP light came on and the ride became very rough. When coasting, the ride was smooth, but when gas pedal depressed, the ride became rough. At stop, the check engine light would come on, then go off when driving.
Sounds like your car sensed some wheel slippage and engaged the electronic stability control and or ABS. If the check engine light flashed, you should have a fault code stored in the computer. I would take to a shop and have code retrieved and checked.
RepairPal Certified shops can diagnose and repair your 2011 Volkswagen CC. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.