I want to link a new nintendo network id from my wii u to my 3ds but to do that I have to delete everything and I don't want to lose my games that I got from the E shop please help me!
There is no way to transfer or share games across Nintendo Network IDs. Since the 3DS only supports one NNID at a time, you would only be able to use one account or the other. In other words, you cannot access the games from both NNID's on the same 3DS. Your only option is to do a System Transfer from your current 3DS to another 3DS.
One thing you should know is that a NNID is permanently tied to a single 3DS unless it is transferred to a new 3DS. So if you were to format your 3DS without doing a transfer first and then pair it with your new NNID, your old NNID would be stuck in limbo as it would still be locked to that specific 3DS.