It could go many ways. I think all the peoples in the UK would be better off long term, but the political landscape in the UK and the continent would change drastically.
How successful trade negotiations are with the EU in the UK could trigger Switzerland and Norway to reassess their relationship with the EU as well, Switzerland in particular, which has unique concerns around immigration, temporary workers, and independence of its finance system, as well as a historically unique approach to defence.
If Scotland has a strong remain vote, a second referendum is inevitable, and likely to be successful this time. This would trigger fresh independence across the EU, notably in Catalonia, which if successful may trigger the same in Basque and Galcia.
Calls for EU exits in Greece, the Netherlands, and the Czech Republic would grow extremely strong, and may well see exits. If any of these were to happen it would certainly trigger some sort of structural reform of the EU, how that reform would happen is impossible to predict.
Such a reform may bring up the Irish issue again, with Ireland stuck in an EU reforming itself away from traditionally British interests, but still having the UK has its largest trading partner by some margin.
EU expansion to the east would come to a dead standstill for a decade or more as these issues are resolved, which I think is a good thing.
It is my hope that these things will weaken the EU as a supranational state with ambitious assimilation ambitions, and it will become an association of co-operating nation states, which I believe is better for democracy, personal freedoms, peaceful foreign policies, and entrepreneurship.