The only countries that fit the tag of "prosperous non-EU counties in Europe" are Norway & Switzerland.
Norway not only has oil & gas reserves that are massive in relation to its population, but has kept them nationalised and 'banked' the proceeds to use for the benefit of the country (rather than giving the profits to the already wealthy in the form huge tax cuts in the 80's, whilst bankrolling the de-industrialisation of the UK through failed monetarist economic policy). Switzerland has a huge insurance and financial services (and money-laundering) industry, and again is a relatively small country in terms of population.
Speaking about bankstering and money laundering, there is a large weight of evidence that one of the factions driving the anti-EU movement has as its core aim escape for EU oversight of the increasing efforts towards financial transparency. The 'Spider's Web' of British Overseas Territories and Crown Dependencies have a thick veil of secrecy. It's not so much about people having secret bank accounts (although it's part of it), more the creation & use of shell companies to hide the beneficial ownership of assets like land, property and shares in/ownership of other companies. They facilitate massive levels of tax dodging and money laundering, which the EU is intent on cracking down on. When senior figures in the 'leave' movement have direct links to this industry either by benefiting from the secrecy of 'offshoring' themselves* or their work revolves around that. The biggest funder of the leave campaign has a lot of questions around the source of his wealth, with open allegations about links to the Putin regime and questioning by Parliament (at which he smirked and refused to answer questions). The increasingly tough Anti-Tax Avoidance Directive and Anti-Money Laundering Directive each sought to strip away the veil of secrecy of the BOTs/CDs and, whilst the UK govt has implemented some watered-down legislation, a hard Brexit with no ECJ oversight would leave the implementation of legislation very much compromised, especially under the government of a right-wing party of shysters funded by big business, corrupt Russian oligarchs and hedge funds.
* as an aside, the owners of the Daily Heil, Daily Express, Torygraph, Times and Scum are all 'non dom' or similar status that means they don't pay full UK tax
https://en.wikipedia.org/wiki/The_Sp..._Second_Empire