It works exactly how it says.
You can turn a bunch of grass (or planks or whatever) into a skeleton, or zombie, or whatever kinds of Undead your Death sphere talents allow you to create.
You seem to be inferring some additional rules that are not present in the entry, however.
The skeletons, zombies, or what have you would have standard bestiary stats. They would not be '1/40 hd zombies' or whatnot. Unless, of course, you had some 1/40hd Plant creatures, dead, that you were re-animating - then you would apply the zombie template as normal. However i'm unaware of any 1/40 HD creatures in any printed pathfinder product and i'd recommend against homebrewing some.
Would that make a ship a valid target?
A Medium sized chunk of it, sure. You could rule as the DM that the entire ship turns into a single medium sized skeleton, but that breaks considerable verisimilitude for no reason. It is far more logical to assume that a Medium sized zombie only uses a Medium sized chunk of the ship (which if it's the outer hull may still lead to flooding).
(Which feels broken since for enchantment sphere animating a ship requires twenty caster levels.)
Keep in mind even if you ruled that the entire ship turns into a single skeleton (which you shouldn't), it would no longer function as a ship. It would be a Medium sized wooden Skeleton, with the stats of a Skeleton from the Bestiary. While Vehicles do have stats in PF, they are not, strictly speaking, Creatures and thus the template would not be applied to vehicle stats. An Animated Object Ship would however be a creature and you could (somehow) apply the Skeleton template to it if you first Animated it, and then, de-Animated it (violently). However that would require at least finding an Animated ship first before violently disposing of it and reanimating it necromantically. Which would potentially also be beyond the Necromancer's HD limit, as Animated Objects have quite a few HD.
A ruling that came to mind was it targeting individual planks but in that case it would also be valid for single pieces of grass which probably isn't intended. (Since if that was the case a death mage could cast 'mass death magic' and create forty minions with one HD)
As I said previously, you can't just magic up 1/40 HD creatures, you either get the Standard Zombie, or you apply the Zombie Template to an existing (dead) creature. Likewise, verisimilitude would lead me to rule that you need a Medium sized amount of dead plant matter to create a Medium sized skeleton or zombie, which is the only kind you can create without, again, the corpse of a Creature to reanimate.
The Sylvan Necromancy ability is a bit strange as written and you might be tempted to homebrew some 'plant zombies' that the druidic necromancer can reanimate with uniquely plant like traits and sizes larger than medium (or smaller than medium). However if you do so, I would steer away from randomly making it overpowered (40 zombies for the price of one or such) and instead look at existing bestiary creatures for inspiration/balancing purposes, and keep in mind as with all homebrew that if it is too much (or too little) you should feel free to change it.