I have a paperback copy of A.J. Thomson and A.V. Martinet's, Fourth edition A Practical English Grammar, (henceforth PEG), updated in 1985, and in the examples cited by the OP:
How long have you learnt English?
How long have you been learning English?
the authors preface by saying [emphasis in bold, mine]
192 Comparison of the present perfect simple and continuous
A An action which began in the past and is still continuing or has only just finished can, with certain verbs, be expressed by either the present perfect simple or the present perfect continuous. Verbs which can be used in this way include expect, hope, learn, lie, live, look, rain, sleep, sit, snow, stand, stay, study, teach, wait, want, work:
How long have you learnt English?
How long have you been learning English?
He has slept for ten hours.
He has been sleeping for ten hours.
It has snowed for a long time.
It has been snowing for a long time.
I do agree that the question “How long have you been learning X?” sounds better today than its Present Perfect simple equivalent “How long have you learnt X?”, but I do not consider the latter to be ungrammatical. And I suspect that “I have learnt [language]”, was always more idiomatic in British English than in American English.
PEG was first published in 1960, so I searched Google books to find a version prior to 1985 but unfortunately Google does not provide previews of earlier editions. Instead, I found several instances of I have learnt English and I have learnt it from bilingual dictionaries and grammar publications that appear to support PEG's claim.
From English Made Easy, printed in 1909, we have the Present Perfect simple example

And another example from Elementary French Grammar (1911)

The Incorporated Linguist (Vol 21-24) printed in 1982

(I had better make it clear at the outset that I have no ax to grind; I am a modern Languages lecturer, and though I have learnt Latin I have never had much enthusiasm for it.)
Another example, but this time from a work of fiction, The Rebel Generation (1928), by Jo van Ammers-Küller
" To become a doctor! Why you know as well as I do that you must be brought up to it from your childhood. The mere fact of your not having learnt Latin and not having passed any school examinations.…”
“But I have learnt Latin,” she said. “I've been working at it for a year.”
The 1928 instance, clearly shows the protagonist's studying Latin did not end after a year.
To dispel any doubt whether English allowed its speakers to use the present perfect simple learn to express the idea of currently learning a new language which began in the past and continued until the time of speaking, here is an extract from a letter written to David Hume–the Scottish philosopher and historian, by Colonel Edmondstoune, in 1764.
I wish your time would allow you to come here: you have a great many friends; among the rest a Madame Tronchin, wife to the procureur-general, a virtuous, generous, charitable, good woman. She has learned English since I have been here, and can read your History with as much ease as her own language. Her husband is a man of merit, a man of genius; but knows you only by the translations of your works.
The 1764 citation hints that Madame Tronchin started learning English when Colonel Edmondstuone arrived and that her learning was on-going.
There is further evidence that the aforementioned construction, which we consider peculiar today, has not totally disappeared. One such example was used in a recent sociological and scientific study:
Latino-oriented media and news literacy in English must be conscientious of and take into consideration the specific lessons that would be best understood, which will be contingent on the targeted Latinos’ level of education and also their particular language-learning experiences. A monolingual English-speaking Latino who has learned English since birth but primarily in informal or non-school settings will not have the same ability as a Latino English-speaker who has had formal education at increasingly higher educational settings.
Media Literacy in a Disruptive Media Environment (2020)
Also from another study, American Indian Culture and Research Journal (1990), we see the usage, mentioned by Thomson and Martinet, does not seem all that strange all things considered

But since one-fifth of the adult American Indian population has learned English since childhood, the extent of the language mismatch could be as great as four out of nine. These levels of mismatch assume that American Indians who speak English speak or understand it well, but 7 percent do not speak or understand English well…