Assuming you're in the playoffs, then you can demote them after your post-season ends.
The only time you're "screwed" would be if you make the World Series. Once the WS ends, the world is frozen and you cannot make any roster moves. So they will rollover on your ML roster and into next season with ML contracts.
You can still demote them before ST games start the following season, but they'll have $343k salaries.