Official:
No definitive answer, there are different governing bodies and plastic wraps (cling films) in the US/Europe. There are also different plastic wraps for different purposes, microwave safe, safe for use with fatty foods, so on. Whether its safe or not will depend on the product used and most likely the time boiled for. The UKs Food Standard Agency said no (in 2012!) broken link - "Do not use cling films where they may melt into the food, such as in conventional ovens or with pots and pans on cooker hobs". The cling film industry are understandably much more positive.
Practical:
I've poached eggs using cling film for ages and I'm still here. Read the plastic wrap boxes for warnings and choose the plastic wrap that's most suited. Poach an egg as described here (as of 2016, link requires registration to read) and check if the wrap comes away cleanly, If so you're good. I'd revisit this advice if your recipe called for cooking like this for longer than 5-10 minutes, there are likely more suitable products/recipes for extensive boil-in-the-bag manoeuvres.
EDIT
Many meals have passed, I'm less gung-ho on heating cling film/plastics. It's amusingly still as contentious as ever and I certainly wouldn't brush the film with butter/oil/fat. My totally unscientific advice now would be learn how to poach an egg properly, It's fun, tasty, and significantly less boring than reading this answer. I like Ocaasi's answer, FWIW.
It likely depends on what 'turning bad' means ...
If you have a couple in the bag starting to sprout, but the rest haven't, you can roast or bake the ones that haven't sprouted, let them cool, then store then in the fridge so you can pull them out to use them in something later in the week. (eg. home fries, patatas bravas or a hash).
For those that have started to sprout, but are still firm, you can cut away the sprouted bits (this time of year, you might even be able to plant them), peel them, and then boil them and turn 'em into mashed potatoes (which you can then vary for the next couple of days ... you can mash 'em with other stuff to make a sort of potato salad; you can add cooked greens to make colcannon or bubble and squeek; you can use as a topping for a cottage pie (the technically correct term for shepherds pie when you're not using mutton or lamb)
Some of these freeze well ... I've made up cottage pies and frozen 'em in oven-proof containers; you could likely do the same with just mashed potatoes -- I see 'em for sale in the grocery store all the time.
If you're looking for something to cook that just uses a lot of potatoes (in a non-whole state, in case you need to cut away parts) ... potato salad, potato bread, potato curry, latkes, potato soup, tortilla de patatas ... the list goes on.
... and if they're soft and squishy, or oozing liquid ... pitch them. They're rotting, and not worth getting sick over.
Best Answer
There are two factors to consider, both related to the evaporation of water from the cooling dish:
Modern refrigerators are very powerful, so if a little water dripping back is not a problem (which it would not be for a bolognese for example), go ahead and cover the item and place in refrigerator.
On the other hand, if water dripping back onto the dish would mar the surface (of a pumpkin pie, for example), you will want to cool it without a cover until it is no longer steaming.