If a player summons/spawn with a mob egg a hostile entity (Creepers, Spiders, Zombies, Slimes, LavaSlimes etc.), and then changes his gamemode to spectator mode, the hostile entities will despawn. And also, if the player is on spectator mode, and summons a hostile entity with /summon, the mob will be shown for one tick (Or two? I don't know, I just know it's a very short time, maybe for one frame or two), and then will despawn. Then, if the player goes back to survival, adventure or creative mode, he will be able to spawn the hostile entities again.
Environment
os.name - Linux
os.version - 3.13.0-27-generic
os.arch - amd64
java.version - 1.7.0_55
java.vendor - Oracle Corporation
sun.arch.data.model - 64
Works as intended. See MC-46776