The timing of leaving a league is kind of irrelevant, nothing appears to happen to your car design. Your team will just go into hibernation and retain all the design attributes (plus engine and parts wear) that it had the moment you left a league. The only difference is that because you're not racing your drivers and staff will not age, none of the contracts for drivers, staff or sponsors will expire and your monetary expenditure that is calculated on a race by race basis (i.e. wages) will also freeze.
So taking your team out of a league is the best thing to do if you're having an extended break. If you don't do this then the next time you log in after a long break you may find your drivers and staff have all been replaced by half star people and you've gone bankrupt. The higher the tier you are in the worse will be the consequences.
Cars are reset when you join a league. The best time to join is during the break between seasons because this will result in a competitive car. The definition of joining in the break is after the last race of the season completes and before the first race of the next season locks for qualifying. Note: If you have raced in another league within the previous 24 hours you will not compete in the first race of your new league because you are only permitted to compete in one league race in each 24 hour period.
Joining part way through a season you will have a poor design for that season (needs some careful planning to avoid relegation) but there is a bug which will give you an overpowered car the following season. Most hosts will insist you reset an overpowered car or you face being kicked from a league.
For design reset rules read this...
New Design Balancing system when changing leagues