It is uncertain. Here is the evidence which I could think of at the moment.
Not all of Mordor was a wasteland when Sauron ruled it. In the Return of the King, Book VI, chapter 2 "The Land of Shadow", Sam wonders how the hordes of orcs find food the eat. The narrator then says:
Neither he nor Frodo knew anything of the great slave-worked fields away south in this wide realm, beyond the fumes of the Mountain by the dark sad waters of Lake Nurnen; nor of the great roads that ran away east and south to tributary lands, from which the soldiers of the Tower brought long wagon-trains of goods and booty and fresh slaves.
It is quite possible that Sauron also had slaves growing food in that section of Mordor before he was overthrown in the War of the Last Alliance. And there were about three possibilities for their fate:
When Sauron was overthrown, the slaves around the Sea of Nurnen all left Mordor, heading for their original homes. That would happen only if all the slaves were born elsewhere and imported into Mordor instead of being born there.
When Sauron was overthrown, the slaves remained in Mordor, ruling themselves, and their descendants remained there for thousands of years until Sauron returned and enslaved their descendants.
When Sauron was overthrown, the slaves remained in Mordor, and tried to rule themselves, but they had been so oppressed that they didn't know what to do or how to make decisions, and so they all died out within a few generations.
Some combination of the above.
Thus it is possible that some part of Mordor was continuously inhabited during all of the Third Age between the Fall of Sauron and the second rise of Sauron. It is also possible that Mordor was conpletely desolate and uninhabited for at least part of the Third Age.
If the Nazgul count as inhabitants, in The Return of the King, Appendix B, The Tale of Years, The Third Age, the entry at TA 1980 says:
The Witch-king comes to Mordor and there gathers the Nazgul. A Balrog appears in Moria, and slays Durin VI.
In TA 2901:
Most of the remaining inhabitants of Ithilien desert it owing to the attacks by the Urks of Mordor. The secret refuge of Henneth Annun is built.
So by TA 2901 Mordor was already inhabited by many Urks, a large new breed of orcs, and their attacks drove away many inhabitants from Ithilien. If Orcs count as inhabitants, Mordor was inhabited by many persons by this time. And it is quite possible that human slaves aready farmed by the shores of the Sea of Nurnen to feed the orcs.