I just saw an hour long MIT lecture for no reason and the lecturer said he has flown over 70 kinds of aircraft.
Does that mean a test pilot is certified to fly almost anything?
Since you didn’t specify a jurisdiction, I’ll answer for the FAA. Others should be similar.
Pilots must be rated for the category, class and (if applicable) type of aircraft. Category is pretty broad, such as “Airplane”. Class is a bit more specific, such as “Multi-Engine Land”. Type is even more specific, such as “Boeing 737”.
A type rating is required for any type that:
There is no limit to the number of ratings a pilot can have, aside from the time, money and skill required to pass a checkride for each one. However, type ratings are only available for certified aircraft.
For experimental (non-certified) aircraft, since no type ratings exist, the FAA can issue a Letter Of Authorization (LOA), which waives the type rating requirement for specific pilots in a specific plane for specific purposes, such as flight testing, training or demonstration.
I worked as a test pilot for my aerospace employer. I have a small collection of ratings, and for unusual operations, and for experimental equipment operations we use Letters of Authorization (LOA). We are not involved in airframe certification, but have done a few Supplemental Type Certificates (STC). The most common things we have done are modifications using existing aircraft, and modifying them moving them into an experimental airworthiness classification. Most of our work is with different mission specific payloads and sensors.