[EDIT: On the subject of subspace transporters for distance in prime canon per https://memory-alpha.fandom.com/wiki/Subspace_transporter
"In 2370, Bok subspace transported himself two times, two Ferengi probes and Jason Vigo instantaneously between a distance of approximately 300 billion kilometers (0.03 light years) from his ship. For comparison, it would have taken twenty minutes at warp 9 for a starship to bridge the distance. Geordi La Forge and Data modified the transporter of the Enterprise-D to subspace transport Jean-Luc Picard to Bok's ship. (TNG: "Bloodlines")"]
In terms of precedent for solid rock - there was a TOS episode that pushed the limits of beaming through solid rock with some advanced alien intervention. One could reasonably expect that a century of innovation might get post-TNG era technology there too...
STAR TREK 2x22 Return To Tomorrow
KIRK: (dictating log) Since exploration and contact with alien intelligences is our primary mission, I've decided to risk the potential dangers and resume contact. Log entry out. How long before Starfleet receives that?
UHURA: Over three weeks at this distance, sir.
KIRK: Got something?
SPOCK: Sensors registering some form of energy deep inside the planet.
SARGON [OC]: Your probes have touched me, Mister Spock.
SPOCK: Reading energy only, Captain. No life forms.
SARGON [OC]: I have locked your transporter device on my co-ordinates. Please come to us. Rescue us from oblivion.
SPOCK: Coming from deep under the planet's surface, Captain. Under at least one hundred miles of solid rock.
SARGON [OC]: I will make it possible for your transporter to beam you that deep beneath the surface. Have no fear.
SPOCK: Reading a chamber now. Oxygen-nitrogen atmosphere, suitable for human life support.
KIRK: Lieutenant Uhura, have Doctor McCoy report to the transporter room in ten minutes with standard landing party equipment.
UHURA: Yes, sir.
MCCOY: Jim, why no briefing on this? I'd at least like to know what we're getting into.
KIRK: Easy, Bones. As long as you know there's something down there, you know as much as we do. The rest is only guesses.
SCOTT: I don't like it, sir. The transporter co-ordinates preset by an alien of some sort. You could materialise inside solid rock.
MCCOY: Inside solid rock?
SPOCK: Unlikely. These co-ordinates correspond with the location of the subterranean chamber.
MCCOY: Let's get back to this solid rock business. Just how much rock are we going to go through?
SPOCK: Approximately one hundred twelve point three seven miles, Doctor.
MCCOY: Miles? Are you joking?
KIRK: No, we're not. Let's go.