If I want maximum versatility I would focus on skills and spells. To fill the requirements the best I can, I would recommend a Cleric (knowledge domain) 1/Wizard (Diviner) X, I would make it a half elf. Probably go for the Urchin background.
Here's what the build would achieve:
Starting skills: Medicine (Cleric), Insight (Cleric), Arcana (with expertise knowledge), History (with expertise knowledge), Stealth (background), Sleight of Hand (background), Perception (Half Elf), Investigation (Half Elf), Thieves tool proficiency (background)