To be honest I think he probably was literate (If he existed at all, which, again, I am prepared to accept) but it was probably self-taught and inspired by his visits with his father to the big city and the temple.
I say that because of the one story we have from his childhood where he was engaged with scriptural debate with the temple Rabbis. I imagine they were impressed with the boy's abilities so they decided to indulge him. I can't imagine the spritual leaders would have bothered wasting time with a simple country boy otherwise.