Yes and no.
You do not get more than one opportunity attack per triggering action.
If you're surrounded on, lets say 6 out of 8 adjacent squares, and you take a move action (not a 5-foot step) then any enemies that threaten you can choose to attack when you provoke by moving. If they do not make that attack when you move your first step, then they cannot make an attack later during that same movement. Once they forgo the opportunity, they lose it entirely until you do something else that provokes, like casting a spell. So you could take the first step of your movement, see that they don't attack you, and walk rings around them if you so chose (and had the remaining movement to do so).
When you start casting, and you don't cast defensively, you will provoke an opportunity attack again, and any enemies with opportunity attacks remaining (whether it is because they didn't take on earlier or because they have combat reflexes) can once again choose whether or not they wish to utilize this opportunity.
So if you were to take a move action to start walking away, and all of the enemies took an opportunity attack against you, first, you would end up taking a lot of damage, then (if you were still conscious) you could walk back up to them and cast. If any of them has Combat Reflexes, they will get another opportunity attack on you for casting.
For some simple math, here's what your odds look like for getting the spell off.
In all honesty, you're FAR better off casting defensively than trying to cast and save vs the damage.
Casting defensively is 15 + 2x spell level (for a maximum of DC 33 for a level 9 spell), while casting from damage is 10 + damage + spell level. Unless you're fighting kittens, any ONE attack is more likely to exceed the level of the spell you're trying to cast. For reference, here's some math on a lvl 1 spell. Either DC 17 (15+(2x1)) or (10+1+damage) and the likelyhood that an attack is going to be less than 6 damage is rather low, even at low levels.
At level 1, you should have a concentration bonus of somewhere around +6 (+5 stat, +1CL) giving you exactly 50% odds to cast defensively successfully, meanwhile getting hit by ONE dude cause will average 4 damage at level one, giving you about a 60% chance at success. And that's assuming that only 1 out of those 6 guys hit you. If all 6 hit a) you're dead, and b) depending on your DM you may have to either roll 6 times (once per hit) OR, he could total all the damage first, the make you roll vs THAT DC, so if they averaged 4 damage on a hit, that would be either 6 DC 15 checks, which are bad odds, or 1 DC 35 check, which you'll fail automatically (no auto successes on 20 on skill checks, and you can't roll a 29 on a d20).
Once we hit level 8, our defensive DC for a level 4 spell has only gone to DC 23, meanwhile your concentration should be now somewhere around +15 (+7 base stat, +8 CL) giving you a 60% chance of success, assuming you haven't gotten anything to further boost concentration checks, like traits, feats, class features, items, or racial bonuses. Whereas if you want to tank some hits, you're now looking at an average of 13 damage on a hit, giving you a starting DC of 27, which is already much harder than casting defensively. And if you take more than one hit, you're basically guaranteed to fail.