Czech Republic and Slovakia joined after splitting up.  The Prodi doctrine states if an area in the EU separates it must re-apply for EU membership and you can be sure Spain would veto Catalonia's entry in retaliation.  Thus if Catalonia separates they will be outside the EU which I don't think even most Catalan nationalist want.