Hello!
I get the "failed to install content: 0xD9004586" error when trying to install games that weight more than 3GB (and some that have just 3GB), specifically Pokémon Moon (I have Sun installed already and I've played it with no problem) and Dragon Quest 8.
Actually, it kept happening even with other games before (Project Mirai, Rune Factory 4, even with Dementium Remastered), but I solved it a couple times just formating my SD card and copying the data from the one I used originally. Ah, Pokémon Moon worked (it installed and I played) before the first format, which I made because this error happened.
I checked my SD card with h2testw and it shows no problems.