I just found how Warcraft 2 on GOG handles CD keys. It has a launcher (similar to Diablo 1), but with additional option called "Change CD Key".
This would not be an issue for Diablo 2 either, GOG sells multiple games using CD keys. Usually a default one shared between all GOG users is setup, and you can replace it by a personal key that you can get from your account.
Now it up to Blizzard to release the game on GOG. However, as mentioned above they would need to allow installing the game and single-player gameplay without entering CD keys (currently this isn't possible).
In my opinion, the real issue is not the CD key or anything like that, but their mandatory game client. Especially for a game heavy on multiplayer like Diablo 2.
Just chiming in, there is no game client for Diablo 2, and never has been. The servers are battle.net servers, and always have been.
There has never been any sort of client required to run the game. The installers you get off the b.net website are standalone installers, similar to GOG. If you don't care about cd keys, you can buy D2 from Blizzard right now
instead of waiting, and once you set it to run in a window, it works with Windows 10 flawlessly, and from what I remember out of the box with 7/8.
If it comes to GOG I'll rebuy it so Blizzard brings more games here, but I suspect any of their newer games will be online only, such as the remastered version rumored to be coming out next year.