If you want them to escape then make sure you have a robust escape mechanism in place: not just, they run away when under 50% HP - have a means of getting out of combat and a means of getting out of the combat scene. PCs have an irritating habit of foiling even the best laid plans. That being said make sure it is a plausible mechanism: a bandit captain probably won't have access to dimension door, unless he is a lieutenant to a powerful mage. In which case make sure that you've dropped hints about what the PCs are dealing with. PCs should be able to affect the story in ways you have not planned, otherwise you are just writing a book.
Secondly, plan for what to do if the BBEG doesn't escape. How will your story continue? Have clues that replace the chase scene, or other lieutenants that step into the BBEG's place. In the latter case don't just have BBEG MII, actually make it something different, as though the PC's actions had an effect. eg the BBE organisation splits into two factions, each under a lesser lieutenant. An all out attack against one will bring them both together or if the PC's are careful they can use subterfuge to play them off against each other.
Never hand wave it and never have your entire story hinge on something that the PC's have influence over. There is not point even having the fight if the end result is set in stone and required to continue the story. If you absolutely need him to escape, don't have him in the fight. Put the BBEG in his own room and as soon as the PC's enter it simply describe him escaping.