So if you have save data from the games that you bought from like game shop or something around those lines? What happen if you do delete the Nintendo network Id would it keep the save data from the games you got from other shops or just from the EShop?
You can't really "delete" an NNID from your console without calling Nintendo Support, as it syncs with Nintendo's servers.
It shouldn't invalidate save files at all, regardless of whether you log out or unlink entirely. Physical games have their save files stored on the cartridge itself, and digital games from the eShop have their save files stored on the console's SD card.