I expect this to happen at some point in the not too distant future. WFC launched 2005-11-14 and was discontinued 2014-05-20, so it was up for almost exactly 8 and a half years. Part of this was due to the shutdown of GameSpy (WFC multiplayer was based on GameSpy), but it's probably not a bad analog for 3DS/WiiU NN shutdown. Nintendo Network for 3DS launched 2012-01-26, so our 8.5 year mark would be mid 2020; WiiU support launched 2012-11-18 putting us mid 2021 (but nobody cares about WiiU). Looking at it another way. WFC shut down about 2.5 years after NN launched; Nintendo Switch Online launched 2018-09-19, which would put the shutdown in early 2021.
tl;dr - Based on previous timelines, I would expect Nintendo Network (for 3DS and WiiU) to shutdown early 2021
Edit: On another note, it looks like somebody is already working on this:
https://github.com/PretendoNetwork/Pretendo