Beyond the Cantrip/Wish spells, which are fairly open ended, which other spells are most likely to encourage creative role-playing in a D&D session?
I don't think there's any specific spell that encourages creative role-playing. These are both encouraged by the GM. Lightning bolt encourages creativity (not really role-playing per se, but creativity, which are different things) if a player is allowed to use it in clever ways like routing it down metal/water; then it's creative. If they are required to keep spells to legalistic limits, then even cantrip and wish are not adding anything creative to the game. I've seen knock used to drop a bad guy's drawers and one sorceress was such a devotee of burning hands that it became her Swiss army knife. It has nothing to do with the spell itself and everything to do with the attitude brought to the game by the players but especially the GM.
Polymorph Self was always my favorite way to add a lot of creativity to wizards in original AD&D (I haven't played 3.0/3.5 or 4e to see how the spell was changed for those editions).
At one game at Gencon I was playing a wizard who had been aged by an undead attack (as part of his background) - I used the Polymorph Self spell to polymorph into a gargoyle which allowed me to survive a section of the adventure which the DM later told me had almost been designed to kill off my character (and yes that's pretty bad conference game design).
In 4e from what I have observed (mostly via listening to various live play podcasts) it appears that many players and DM's have found some creative ways to allow for magic using players to do creative effects (somewhat akin to earlier editions cantrips) via skills challenges or just pure roleplaying. Which seems fairly reasonable to me though it could be abused by some.
Generally any spell that doesn't do damage will lead to creative uses and solutions to problems, which is a core aspect of D&D roleplaying. This becomes much less of a case with d20 due to restricted scope of spells. Quest and Geas spells are particularly targetted at roleplaying.
Also, using conditional magic rules from Player's Option Spells & Magic strongly encourages roleplaying.
Recently in my campaign, players were trapped in a really big underwater cave complex, with all the exits collapsed. They decided to escape using Gaseous form, but the only mage being able to cast it was a wild mage, and there was 67% that the spell won't last long enough... So he used summon monster to summon Earth Mephits, which then softened the stones with their magic, shortening the tunnel enough to make the gaseous form work long enough even with -2 to caster level.
I think it's not WHICH spells are best to make you creative, but rather how far your players are willing to "abuse" them (in positive meaning of course). If players can't get creative with the spells they might need a little push, or a signal that they should actually try experimenting. I have noticed that my players are too witty with their spells and skills, and usually they outsmart most of my simpler plans (ie, those created on the fly).
I've always been a fan of using non-damaging spells in interesting ways. For example, Stone to Flesh can give a party some variation in their diet when suck in a cave/dungeon/etc. Image spells are always fun, too, and are most effective when used creatively.
One thing you might do to encourage creative spell use is to have your NPCs demonstrate. Have a master chef prepare rocks with Stone to Flesh as delicacies, and cook with Heat Metal. Have a Gnomish city where traffic is directed by Dancing Lights. Integrate creative magic into how the game world is presented.
Once thing I've seen that can encourage creativity is allowing minor modification of spells on the fly within limits. This creates more work for the DM/GM as far as adjudicating what is allowable, i.e. in what ways can you modify Burning Hands, or in what ways can you modify Otiluke's Resilient Sphere.
The first group I ever played with was great at this. The DM required an intelligence score of 2 higher than the level of spell you wanted to modify, and had clear guidelines as to what was allowable per each spell level and type. If you wanted to do something really funky he was usually open to that. He even went so far on occasion as to allow spells to be combined at a cost of one spell slot per spell combined + 1 spell slot for the act of combining them.
This was a great group to play with, and the ways our wizard utilized these house rules were truly awesome.
Recently, I allowed a player to use create water on a shambling mound made of swampy, mostly watery plant material to cause over 40 HP of damage by causing it to swell up and explode. This was with a party of six 12th level characters finding it difficult to deliver damage to a group of shamblers. The player was pleased to find an otherwise useless low level spell to become so effective against a tough creature.