The Apple Support article: Check your Apple ID balance - Check your Apple Account balance - Apple Support says:
"About unused Apple ID balance
You can't redeem or return Apple Gift Cards, App Store & iTunes Gift Cards, or unused Apple ID balance for cash, except as required by law. If your jurisdiction allows for refund of redeemed gift balances, you can contact Apple Support [ Contact - Official Apple Support ] to request a refund."
Normally balance cannot be transferred between accounts but if this was an actual card (not electronic) and you have not spent any of it you can see if Apple would be prepared to return the value to the card.
Click here --> Choose your country or region - Official Apple Support Select your country, then a product. If you don't see one that handles your issue then keep experimenting with selections until you reach one that gets you a chat session or a telephone call and get the representative to redirect you.
or:
Contact Apple for support and service --> "See a list of Apple phone numbers around the world." Click here --> Contact Apple for support and service - Apple Support