I wouldn't think so. Calling it "cosmetic" means it just looks like it's damaged and really isn't. When the car is damaged, you will be shown an indicator in the lower left letting you know where the damage is and the severity. That's "mechanical" damage.
I believe that is simply based on the mileage and worth of the car, not any damage it has incurred. But yeah, kinda pricey. Any mechanical damage sustained from racing will be reset at the end of every race, just in case you didn't know.