You have to (assume Nintendo doesn't just wipe balances) link the account to a Nintendo Network ID. Then create a profile on Switch, linked to the same Nintendo Network ID. Then on the Funds menu inside the Switch eShop, there will be an option to share the balance with Wii U/3DS. Again, hopefully Nintendo won't wipe balances and will keep them there to be reclaimed in this manner.
Problem if you are a user linked out-of-region accounts is that although Nintendo allowed me to use my US credit card to buy funds on the JP account on my JP 3DS previously, they don't allow that on Switch. It will detect and refuse CC or Paypal accounts outside the account's region. It'll let you still link the account, even if the Switch doesn't match, and you can even access the store. But to add funds, it'll only accept Prepaid Cards (which means you'll have to buy codes from a seller you trust).