It's like people in Middle Ages Europe building cathedrals out of cut stone because concrete, used extensively centuries earlier by the Romans, was lost to them. Or how hydraulics eluded them completely despite the ruins of aqueducts all over Europe. But, a Crusaders saddle and stirrups would seem very advanced to the Romans.
A really big social collapse has been proven to push many developments back while allowing other development to continue.
Which is a scenario that is more or less to occur for pre-industrial planetary civilizations that have low redundancy, no advanced methods of storing knowledge over time, and puts everything in one basket... but not for an interstellar organization comprised of dozens to eventually hundreds of alien species working together and collaborating with massive amount of backup and redundancy spread over 8000 Ly's of space.
Short of an EMP or a solar flare frying our equipment, or massive earthquakes (btw, we CAN design technology which is resistant to both EMP and Solar flares and design buildings to be earthquake, tornado, and generally weather, fire, termite, etc. proof if we stopped applying cost-efficiency and focused on technical efficiency, sustainability and problem solving), loss of data for us is becoming less and less likely.
We can ALREADY build DNA storage that can last a thousand years.
Back in 2013 nanotechnologists created a disk that can last a million years.
Technology and science evolve exponentially (something that Trek writers - and most people - don't seem to get).
Do you realize what that means for an organization like the Federation? By the 23rd century alone, data storage, durability, etc. (just to name a few) would have evolved to such a degree where they would survive for hundreds of millions of years or likely BILLIONS... similarly, other technologies would have evolved in a same capacity.
In Trek, it was shown that every Federation starship, station/outpost has a Federation database which contains a ridiculously comprehensive history/information of each member species... otherwise, no Federation ship (or station) would be able to do any viable research or make realistic holographic representations of people from centuries ago.
In essence, 'forgetting knowledge' in such a situation (yes, even WITH the Burn happening) is simply speaking next to impossible.
Short of the entire Federation being wiped out, and every single copy of Federation databases erased (which we know didn't happen), loss of knowledge simply wouldn't happen over time.
The redundancy and safeties in place are simply speaking monstrous to comprehend for us when talking about MORE advanced technological space faring cultures.