How much mountain biking experience is needed for Goat Canyon Trestle Bridge via Carrizo Gorge Road?
I am unfamiliar with that route.  However you say its an &quot;out and back trail&quot; so you'll be coming back the same way you went in.
Simply evaluate the terrain on the way in, and if you think its going to be beyond you on the way back, stop there.
Disused train tracks are normally almost flat - trains can't climb a grade any steeper than about 1.5% on plain rails, so as long as it wasn't a cablecar or cogged funicular railway, then it will be essentially flat.  If the route leaves the track bed then that no longer applies.

Note that there are descriptions and text in the link you posted

As of December 2020, some of the tunnels are closed, but detours are provided.


Warning: Users have reported that this trail is located on private property and you may be subjected to fines. It is recommended that you do not park on the dirt roads.


Hikers report that the first and third tunnels are closed and one is also gated off. Both of those closed tunnels offer detours.

So that closed tunnel is why the elevation record in your link shows some 10% grades, probably the detours up and over the closed tunnels.
And there's a tag of no shade so its going to be hot and dry.  Pack sufficient water as well as the usual necessaries.
Basically - if you find something that you feel is beyond you, stop and return.