I read this interesting book review from Bill Clinton and it got me thinking about this. To what extent have modern, (Post WWII - Clinton) presidents displayed a good knowledge of 18th and 19th century US history?
This is a difficult question to answer, because "displayed a good knowledge of history" is so subjective and will inevitably be wrapped up in political opinion.
So instead I will deal with the simple facts of their education and academic credentials. In the WWII period through Clinton, US presidents tended to have prestigious academic backgrounds.
This article from the national archives provides a bit of an overview https://www.archives.gov/publications/prologue/2007/spring/schoolhouse.html
Eisenhower was an avid historical reader by his own admission, and graduated from West Point. He later served as the president of Columbia university and was involved in several academic think tanks.
Kennedy attended Harvard, and studying political philosophy. His thesis on appeasement of Germany ended up being published in it's own right as Why England Slept and was financially successful.
LBJ was less academically inclined. He came from a poorer background and struggled in school, and does not have the serious academic credentials found with most of the other modern presidents.
Nixon came from a more prestigious academic background. He was a rising star as an undergraduate, and went on to graduate near the top of his class from Duke Law. This would have necessitated an in-depth historical background. He wrote ten books and in the words of the NYT review of his last quoted from "Aquinas, Irving Babbitt, Isaiah Berlin, Brandeis, Burke, Churchill, Lord Curzon, Engels, Goethe, Hobbes, Eric Hoffer, Ibsen, Kant, Malraux, Nietzsche, Pushkin, Schumpeter, Toynbee, Weber, Wellington and, of course, Tocqueville". He was very well read.
Ford graduated from Yale Law and graduated high in his class. He was a strong student in a program that would have required historical education. His career was not as academically focused as others in the list, but he certainly would have received a strong historical background as a student.
Reagan was generally a poor student. He graduated with an undergraduate degree with mediocre grades and did not pursue any higher degrees.
H.W. Bush was an accomplished economics student at Yale who went on to briefly teach. He was not particularly academically inclined after leaving university.
That gives you a very rough overview of the backgrounds of the recent presidents. LBJ and Reagan did not come from a strong academic background. The other five presidents excelled at some of the most prestigious universities in the country.
Sources:
I drew a bit of this post from The American President by Leuchtenburg, but honestly most of this information does come from presidential library biographies and is basic factual info about educational achievement. It is intended as a sketch of the academic background of recent presidents because that seemed like the best way to convey the broader picture that the question seemed to be asking for - if that is not detailed enough please delete this.