Anchoring is not properly defined in the rules
I did look for an answer to this question and I can only tell you that there is no official answer (yet). So what the author's meant when they created that rule is anyone's guess. I did ask Mark Seifter (designer) what anchoring means, but who knows when he will answer that.
Until then, I present you what I believe to be the case.
You have to physically anchor the spell effect to the ship
All those spells produce physical effects, and while the ship is moving, they aren't going to accompany the ship. You have to actually anchor it to the ship somehow, maybe using ropes or even chains, but you will have to specifically describe how the spell effect will be anchored, so the spell effect will move with the ship.
There are very few references to anchor in the rules, and looking through the six books of Skulls&Shackles and the Player's Guide (the source of that rule) didn't prove fruitful either. But we have a similar reference under the Entangled condition:
Being entangled impedes movement, but does not entirely prevent it unless the bonds are anchored to an immobile object or tethered by an opposing force.
We conclude that this anchoring is not a new rule about spellcasting, because if it was we would have an explanation about what it means. Instead, the text there is referring to the actual definition of the word.
Permanency is another option to anchor spells
As explained under Naval Combat, ships are objects. Thus, they are valid targets for certain permanent spells.
Additionally, the following spells can be cast upon objects or areas only and rendered permanent
And out of the spells that require anchoring, it lists these: Prismatic Sphere, Prismatic Wall and Wall of Force. Leaving three others out: Forcecage, Resilient Sphere, and Wind Wall.
Prismatic Spray makes no sense at all, because it has an Instantanous duration and as such, ships cannot pass through the spell effect. It happens and then the spell is over. Wind Wall is another weird case, this spell produces no physical substance at all. The only exception being if you are a tiny or small flying creature, which cannot pass through the barrier
As for Resilient Sphere, there is an argument that this spell can be made permanent, due to the text that says that it works like Wall of Force, which can be made permanent and says so on the spell's effect:
The sphere functions as a wall of force, except that it can be negated by dispel magic.
Eitherway, the list under the Permanency spell is not exhaustive, as described by:
The GM may allow other spells to be made permanent.
So there may be spells that can be made permanent that are not listed in there, such as spells published in adventure paths. For instance, the spell Soul Vault cannot be found on the SRD yet, but its a valid target for permanency on a creature.
Another valid ruling is to consider a spell anchored if the target is touching the "ground" level of the ship. This means that targets swinging around, flying, or otherwise not standing on a solid surface of the ship are not touching the "ground" of the ship.
You will notice that several of those spells will not target objects, and as such, the ship is not a valid target. They mostly target a point in space, yourself, or another creature within range. So if you are hanging on a rope and cast resilient sphere, you will be left behind as the ship keeps moving.
This seems to be the interpretation that is most widely accepted for those who have ran the Skulls & Shackles adventure path, lacking an official statement and the rarity of someone using those spells on naval combat. Though this question very rarely ever shows up at paizo messageboards.