The map drawn by Diego Gutiérrez in 1562 shows both North and South American shapes (borders). How did he (or the 15th century Europeans) know the shapes of the American continents and their geography in such detail at that time?
The map shows the general shape of South an Central America, and the general shape of the Atlantic coast of North America. If it shows it in "such detail" or not is a matter of opinion.
Sure, a lot of things are correct, but a lot of things are incorrect. The question then is how they could know the general shape of South and Central America at all, and the reason is simple: They had been there. Once people realized that Columbus didn't reach Asia, but discovered new land there was a large-scale effort by Spain to explore and map the new lands, which Spain had claimed for itself.
As Spain did not claim North America, they didn't make such an effort to explore it and map it. Therefore North America is mostly blank on this map, and the west coast is completely missing.
A lot of things on the map is also simply guessing. For example, the Amazon river is on the map. But as it's not explored, it's just shown as a big snake, which is not how it looks at all. They knew there was a huge river, because they had explored it's mouth, but that is all they knew.
You can also see that the southernmost tip of America is completely wrong. The southern end of America looks like a narrow straight, with another big landmass to the south, and it might easily be thought that this is Antarctica. But in fact, what is shows is the Straight of Magellan with Tierra del Fuego to the south. It was believed up until 1578 that the Island of Tierra del Fuego was a part of a larger landmass, possibly the mythical "Terra Australis".
So a lot of things on this map is correct, and that's simply thanks to 70 years with of exploring and map making by the Spanish. And a lot of things are incorrect, because they had not explored enough yet, and map making technology was still quite primitive.
Update: I realized that the Gutiérrez map did show Longitude, each degree is marked on the equator. It also has the tropics marked, and it turns out the tropics are marked on the right distance from the equator for this to fit with an equirectangular map projection.
So here is an overlay of the Gutiérrez map with a modern equirectangular map: