Polygon has published an informative interview with Captain Toad game director Shinya Hiratake. It is well worth a read and you can view the interview here. One interesting thing that was mentioned is the fact that when they were designing the concept for the game they initially decided that it would be Link from The Legend of Zelda series who would be the main protagonist and he would be quested with exploring various dungeons. However, the team decided against this idea and were then inspired by Super Mario 3D World.
But the original idea for Captain Toad’s treasure-hunting escapades dates back further, when the title was originally pitched as a game starring Link from The Legend of Zelda. Nintendo developers explored the idea of small, diorama-style levels featuring a character that was incapable of jumping. Designers originally envisioned Link as the main character, as he’s known more for his dungeon exploring skills than his jumping abilities.