What is it called when experts think they only know a small part of a topic and amateurs think they know almost all of a topic?
Sounds like the Dunning–Kruger effect:
The Dunning–Kruger effect is a cognitive bias in which low-ability individuals suffer from illusory superiority, mistakenly assessing their ability as much higher than it really is. Psychologists David Dunning and Justin Kruger attributed this bias to a metacognitive incapacity, on the part of those with low ability, to recognize their ineptitude and evaluate their competence accurately. Their research also suggests corollaries: high-ability individuals may underestimate their relative competence and may erroneously assume that tasks which are easy for them are also easy for others.—Wikipedia: Dunning–Kruger effect.
It's a case of "A little Learning is a dang'rous thing".
A little Learning is a dang'rous thing;
Drink deep, or taste not the Piërian spring:
There shallow draughts intoxicate the brain,
And drinking largely sobers us again.
Fir'd at first sight with what the Muse imparts,
In fearless youth we tempt the heights of Arts,
While from the bounded level of our mind,
Short views we take, nor see the lengths behind,
But more advanc'd, behold with strange surprize
New distant scenes of endless science rise!
So pleas'd at first the tow'ring Alps we try,
Mount o'er the vales, and seem to tread the sky,
Th'eternal snows appear already past,
And the first clouds and mountains seem the last:
But those attain'd, we tremble to survey
The growing labours of the lengthen'd way,
Th'increasing prospect tires our wand'ring eyes,
Hills peep o'er hills, and Alps on Alps arise!
The first part of your scenario is called a "Socratic Paradox", after a quote by Socrates (via his student Plato):
I know one thing; that I know nothing
It covers the experts thinking of their own knowledge minimally.
Here are a few more phrase-length expressions of the same sentiment:
The best lack all conviction, while the worst Are full of passionate intensity.
The fundamental cause of the trouble is that in the modern world the stupid are cocksure while the intelligent are full of doubt.
The problem with the world is that the intelligent people are full of doubts, while the stupid ones are full of confidence.
Well, as others have mentioned, the formal term for the illusion of competence among laypeople is the Dunning-Kreuger Effect. The world's best-educated experts on a topic tend to know how much they don't know, and so underestimate their competence, while those who don't get the true depth of the subject claim to be experts.
For a less technical term, you might consider the Armchair Expert, sometimes phrased as Armchair general or armchair quarterback, those people whose only expertise in a subject is what they see on TV, but who claim to have all the answers about nay subject.
You have very good answers here, particularly "the Dunning-Kruger effect."
You may also be interested in the phrase "unconscious incompetence", which describes someone who is unaware of their lack of a particular skill.
There's also "engineer's disease", where an individual fallaciously assumes their expertise in one area translates to another, unrelated area, and and "Nobel disease" or nobelitis, which refers to an individual who is highly recognized in one field using their reputation to bolster crankery, usually on an unrelated topic in which they lack expertise.