Which translation gets the original meaning across better in English?
How is it that this man has learning is accurate.
The Greek text is
καὶ1 ἐθαύμαζον οἱ Ἰουδαῖοι λέγοντες·
πῶς οὗτος γράμματα οἶδε μὴ
μεμαθηκώς?2
A literal translation is:
καὶ ἐθαύμαζον οἱ Ἰουδαῖοι λέγοντες·
And marveled the Jews, saying
πῶς οὗτος γράμματα
How this [one] letters
οἶδε μὴ μεμαθηκώς;
knows not having learned
So, yes, the verse literally says something like what the ESV footnote suggests - this [man] knows his letters.. Tα γράμματα (ta grammata) - "the letters" is a euphemism meaning "learning". We find it also in Acts 26:24
And as he was saying these things in his defense, Festus said with a loud voice, “Paul, you are out of your mind; your great learning [τὰ
πολλά γράμματα] is driving you out of your mind.”
How is it that this man has learning is probably less obscure than How is it that this man knows letters
Does this mean Jesus was never formally trained?
Yes, this verse attests to the fact that Jesus was never formally trained. Also, Matthew 13:54
... and coming to his hometown he taught them in their synagogue, so that they were astonished, and said, “Where did this man get this wisdom
and these mighty works?
Although in Luke 4:16-22 Jesus is described as reading from the scroll of Isaiah in the synagogue in Nazareth, implying that he could read and that he had some knowledge of Scripture, there is no indication that he had ever received formal education or training in Scripture.
Theophylact comments here:
But the Jews marveled, saying, How does this Man know letters, having
never studied? They said this, not because they did not know that He
was the son of Joseph, but because they knew that He had not been
taught by anyone. For He did not learn the Law from anyone, nor did He
study the Prophets with anyone. This is why they marveled (PG
134:677-678)
1. Some manuscripts omit καὶ (and)
2. The original manuscripts did not have punctuation. Various later compilations of manuscripts - Scrivener Textus Receptus, Nestle-Aland, Greek Patriarchal Text - all added a question mark (";" in Koine Greek) at the end of the text, interpreting the verse as a question and not an exclamation.