Rainforests can be extremely productive in everything, but it takes work. First, remember that most rainforests are Tropical (The Olympic Rainforest right over the mountains from me is one of the notable exceptions: a Temperate Rainforest), so you have essentially a Year-Round growing season, making it easy to extract 2 - 3 crops per year. The problem is that all that growth depletes the soil, so Rainforest areas have very poor soil in regards to nutrients (Civ VI actually represents this a little bit, since all in-game Rainforest tiles are Plains rather than Grassland).
The first Spanish expedition up the Amazon, the classic 'Rainforest terrain' if there ever was one, reported dense populations of villages and even town-sized settlements all along the river. Most later historians thought the Spanish must have been feverish, because Everyone Knows the Rainforest doesn't feed that many people. Turns out the locals had learned how to 'manufacture' enriched soil using organic additives and charcoal fixatives, and built terraces with that soil so they were well-drained and fertile 'gardens' for intensive agriculture year-round. It also turns out that a large percentage of the trees and plants in the Amazon are planted - the distribution is not natural - so the locals were also 're-arranging' the rainforest to provide plants that had more utility - nuts, fruits, useful fibers and bark, etc.
So, yes, the Rainforest could support and feed that many people (archeology has partially vindicated some of the Spanish accounts since) but it takes a lot of continuous work. And if you cut it all down to put in a wide-field Plantation (like the Palm Oil plantations in Southeast Asia and Africa) you run the risk of depleting the soil rapidly and winding up with nothing unless you add fertilizer, chemicals, and other 'resources' to the tile/land.
What is needed, IMHO, is some more variety and alternatives to the current Agriculture/Food Production in Civ, which assumes that open plowed fields are the only way to produce enough food for a city population. That model and assumption just isn't true in all cases, and the game needs to model some of the alternatives (and their drawbacks). I should be able to have a Rainforest city, if the game gives me a special Rainforest Terrace Improvement that my little Builders can bust their butts building, and I can have a dense population in a heavily-forested area if I adopt the Three Sisters agricultural system of the Haudenosenee, burn off the undergrowth to make open forests and plant my beans, squash and maize on the edge of and among the open park-like groves - but both of those systems are going to require Population Points to work the tiles, because they are Labor Intensive compared to simply chopping everything down and using horses or oxen to plow the whole thing under and plant a Mono-Crop (wheat, barley, rye, etc)
Here's to more variety and Alternatives in Civ VII!