Eye stalks have sort of happened in the past with vertebres. Mudskippers, rays, Crocodilians, even Frogs all have eyes that at least partially represent eyestalks. While these are more raised eyesockets than full on stalks, it can be usefull to talk about why these animals have these elevated sockets in the first place, and if it could be useful for them to be even higher.
Amphibians often have raised eyesockets when they spend a lot of time partially submerged or at the surface of the water. They have raised eyesockets both for protection from above water predators and to catch surface and above water prey.
Crocodilians and similar animals use their "stalks" in order to catch prey.
Fish, like rays, have raised sockets in order to survey the area while submerged under sand or other ground debree. Mudskippers similarly use these stalks to see above the mud.
Looking at these examples it appears that "raised eyes" among vertebrates relies on the need to see above a visually obscured medium (ie water, mud, sand etc...).
But what stops them from growing stalks further? Simplicity is one, if stalks don't need to be higher, then they won't get higher. Another, as others have commented, is a risk to vulnerability.
But shouldn't even slightly higher "stalks" be better for even deeper camoflauge on say sturdier animals like crocodilians? In crocodilians, they not only have raised eyestalks, but raised nostrils Raising eyestalks would mean possibly loosing hydrodynamic efficiency in water locomotion, as the nostrils would also need to be raised, possibly for little benefit. Nonetheless, it is a viable option of such camoflauge would bee needed.
Now at this point, you may be asking why I left an obvious example out. The Hippopotamus. Out of all these animals, this extinct species of Hippopotamus actually did have quite close to actual eyestalk eyes.
Now the hippo itself already has raised sockets, and follows the previous reasoning presented for needing them (needing to see something above a medium [water]). But this species was special in that they were pretty close to actual stalks, not just slightly raised. I can't comment to why this evolved specifically, but I suspect that because the hippopotamus's nostrils are so far raised in the first place was at least what enabled such a evolutionary trait to not not carry the negatives you might see with modern crocodilians. The nostril height itself was spurred from the extra space needed for the massive canine tusks hippos sport.
If your species needed to see above an obscured surface that was not totally opaque (like water) and wouldn't lose out on another trait massively because of elevated eye-sockets, and also needed to be camouflaged by the surface, then eyestalks would be very beneficial.