Requirements to unlock secret dungeons:
1. Must complete all maps for said town (1-3 stars), secret dungeon wont appear unless you do so.
2. To get inside secret dungeons, you require a key. If in a party, all party members must each have one key.
To obtain secret dungeon keys, you would need to finish a repeatable quest. (this quest appears after doing all the quests for said town)
For the 2nd town, you can get the quest from this npc. The quest is to...