Some parts of this answer will probably depend on DM rulings and the like. The spells aren't always clear about what they do. For example, see this discussion of what exactly freedom of movement does.
As a Veiled Master, this BBEG has special abilities that could be very helpful for this purpose. His tentacles are touch attacks with 20 ft. reach, so he'll probably get Attacks of Opportunity. He can make these more dangerous by using spells based on touch attacks. Calcific Touch might be the best option - it deals Dex damage even if they save and lasts multiple rounds (note that Combat Reflexes doesn't combine with the sell - he can only use it once per round).
He also has the Change Shape ability to duplicate greater polymorph once per round as a swift action. There's all kinds of stuff he can do with this, but the one that looks most promising to me is using greater polymorph as beast shape IV and turning into a magical beast with a breath attack. Veiled Masters have a very high Con bonus, which is what affects the save DCs on breath attacks, and the saves are usually Fort or Ref. These are also supernatural abilities, so they're unaffected by antimagic field.
Some creatures have breath attacks that provide area control - the Dusk Kamadan's inflicts sleep, while the Gorgon's and Gorgimera's can petrify. (I think neither sleep nor petrification is negated by freedom of movement - they don't hinder movement, they prevent you from taking actions in other ways. The Gorgimera is technically 3rd-party - I linked to the one from Tome of Horrors Complete. However, Paizo has published official Pathfinder adventures, such as the Kingmaker AP.)
Here are some spells that might be effective against PCs with high Will saves and freedom of movement.
Effect: Targets the BBEG. The PCs can't get within 10 ft. of him unless he moves toward them.
Pros: No saving throw. Once it's up, melee PCs are severely weakened until it's dispelled. Lasts 1 min./level, so you may be able to cast it before battle.
Cons: Casting time is 1 round, so it can be interrupted (unless you use wish to duplicate it). If the PCs close the distance before you finish casting, it doesn't push them away - you have to back up. Not an arcane spell, so BBEG needs to take extra steps to use it (such as UMD or wish, which have their own downsides). Barrier is visible, so it's an obvious target for dispels. Doesn't keep out constructs, elementals, outsiders, or undead. Not clear how it interacts with freedom of movement.
Effect: Everyone up to a certain HP limit in a 60 ft. radius must make a Fort save or die.
Pros: They can be proximity-triggered, so the BBEG doesn't even have to win initiative. You can also set specific conditions like a trigger word, so you can wait to set it off until you've reduced their hit points. Additionally, you can attune specific creatures so that they don't trigger it and are immune to its effects.
Cons: Limited by current HP. They're also expensive and take time to prepare.
Effect: Invisible walls that the PCs can't move through.
Pros: No save (except for PCs adjacent to where forcecage is cast). Can't be dispelled, hard to destroy through physical methods (though semi-vulnerable to magic). It's invisible, so the PCs might not know it's there until they run into it.
Cons: Disintegrate automatically destroys them. Spells like dimension door can bypass them. Since the walls are invisible, they doesn't block line-of-sight (they do block line-of-effect, though).
Mixed: Blocks ethereal travel, which may help or hurt depending on what the BBEG and the part usually do.
Effect: Creatures and unattached objects inside the area (one 10 ft. cube/level) fall up.
Pros: No save if there's nothing to grab onto. Deals falling damage if it goes up to the ceiling (or you can just trap them floating at the top of the area).
Cons: Ineffective against flying opponents.
Effect: A hot sweltering wind damages, fatigues/exhausts, and knocks prone in an area.
Pros: Can fatigue and exhaust even if the targets save. Deals persistent damage, which they basically have to take as long as they're standing near the control panel. With high-level Resist Energy (fire), you and your allies only need to worry about being knocked prone (not much of an issue for monsters with high Fort saves).
Cons: Fatigue/exhaustion depends on dealing fire damage - anything that doesn't take at least 1 point is unaffected.
Other: It's unclear to me whether freedom of movement would protect you from being knocked prone (I'm inclined to say that it does, though).
Effect: Creates powerful illusions without the need for concentration.
Pros: If the PCs know that they're looking for a control panel, make it look like there are several. They'll have to spend time interacting with them to get a Will save to disbelieve. Even if they make the save, if the fake panels are far apart, they still need to move between them.
Cons: True seeing will see right through it.