TL;DR : We never get an official answer, but one of the TNG follow-up novels takes a few guesses and attempts to expand on the Dyson Sphere artifact.
The only Star Trek novel to expand on the story of the Dyson Sphere is "Dyson Sphere" by Charles Pellegrino & George Zebrowski. It's TNG novel #50 and has the following summary:
Two hundred million kilometers across, with a surface area that
exceeds that of a quarter-billion worlds, the Dyson sphere is one of
the most astounding discoveries the Federation has ever made. Now the
U.S.S. Enterprise has returned to explore the awesome mysteries of the
sphere. Intrigued by what is possibly the greatest archaeological
treasure of all time, Captain Jean-Luc Picard hopes to discover the
origin of humanoid life throughout the galaxy -- or perhaps the
ultimate secret of the Borg.
But when a neutron star approaches on a collision course with the
sphere, a mission of discovery becomes a desperate race against time.
The many sentient species inhabiting the sphere face extinction -- can
even the Starship Enterprise save them all?
In the novel, Picard leads an expedition back to the Dyson Sphere for more in-depth study. What they find is that the sphere is far more sophisticated than they believed, and is hardly lifeless. Rather, the sphere is functionally a gigantic zoo-ship that houses countless species, some of whom are just becoming warp-capable. The Macguffin of the story is a neutron star which seems to have been fired at the sphere to purposely destroy it.
Throughout the novel, Picard and his team make guesses as to who built the sphere and why they abandoned it. The author's pet theory - the one he keeps coming back to - is that the race that built the Sphere eventually
evolved into The Borg. Furthermore, it would seem to be the modern Borg who fired the neutron star at it, perhaps wishing to erase the work of their "imperfect" ancestors. This theory is supported at the end, when a Borg cube is spotted watching events unfold, then warps away without attacking.
The novel also notes that the area around the Dyson Sphere has unusual subspace properties, properties that can only be found in one other area of space - the planet Sarpeidon, focus of the TOS episode "All Our Yesterdays". However, nothing further is made of that connection after its initial mention.
In the end, Picard and crew were able to
save a few species' arkships, but the Dyson Sphere itself narrowly avoided the neutron star and then shrunk away into subspace. The epilogue reveals that the Sphere and its inhabitants are still fine, but now smaller than an atom - apparently a self-defense mechanism of the Sphere's artificial intelligence system.
Note: It's also revealed that the star located at the center of the Dyson Sphere is not unstable as believed during the TNG episode, but rather is
being siphoned to provide enough energy for the Sphere to move. Therefore, the theory that it was abandoned because of an unstable star is proven false.