I find it ignorant that it is thought that nobody was athiest or agnostic in medieval europe. It certainly wasn't publicised or admitted but that is all.
So, declare your character to be a secret atheist. That's fine.
But no one cares what you believe in your secret heart of hearts. They care what temple you go to and what Gods you pray to when everyone can see and hear you.
If you declare in the street that there are no Gods, no afterlife, nothing but gross matter...well, the Gods
have been known to make examples of people like that. Spectacularly.
And if They don't, and you manage to evade the angry peasantry, any noble with a lick of sense would blackball you immediately and you'd lose all your influence and reputation.