Worry not! There is a solution. As long as it is just a slight jiggle in the middle and not a big wave across the cake, you are still fine. Just allow the residual heat of the cake to cook the flan completely. Let it sit until it is cool, or maybe even chill it in the fridge for an hour. The flan will set as it cools.