I've litigated these kinds of cases before, but from the plaintiff (i.e. former employer) side. Obviously, how much it would cost will depend on the facts of your case, the lawyer you hire, and where you live. Most of these cases move relatively quickly--the former employer seeks a preliminary injunction ("PI")/ temporary restraining order ("TRO"). But that doesn't mean they're cheap. They're usually fact intensive and involve a lot of fact-finding, including communications with you and your new company. If the former employer wins their PI / TRO, you are in a compromised position and will be forced to settle pretty quickly. If they don't win it, they'll start discovery and continue to litigate the case, for months or years. More likely than not, their appetite for this will outlast yours, as they have a point to prove to their other employees and their competitors--don't cross us, or it will happen to you.
As to cost, I would expect to be paying at least $200/hr for a decent lawyer (at least where I live)--and the quality of your lawyer can make all the difference in the world. I'd also say that if you don't settle this soon, you'll probably be paying at least five figures in legal fees.
Frankly, there's not a lot of upside here for you, unless you have counterclaims you could make. So, best case scenario, you win, the court releases you from your contract, and former employer goes away. Even then, you're still out the legal fees for your lawyer. Worst case scenario, you fight this all the way to trial and lose, and then you have to pay your former employer's damages and your legal fees.
TL;DR - I'd definitely get a lawyer at least to review your case and give you a sense of your options. But, based on the info in the post, unless you really want to fight this on principle, find a way to cut your losses and move on. And then make more money than ever in your new job.