What is the literal meaning of "auf der Strecke bleiben"? What is the link between the literal meaning and the meaning "to fall by the wayside"?
My first idea has been that the expression is related to the retreat of Napoleon's Grande Armée from Russia (or similar events), when many soldiers died of physical exhaustion, wounds, cold or whatever reason on the side of the road. It seems that this explanation isn't correct, though.
Instead the expression comes from hunting. Jemanden zur Strecke bringen and auf der Strecke bleiben share the same origin (redensarten.net):
Etwas zur Strecke bringen im wörtlichen Sinn seit langer Zeit vor allem Jäger, und zwar nach erfolgreicher Jagd das geschossene Wild. Das wird bei größeren Jagden mit mehreren Beteiligten an einen Sammelplatz fein säuberlich in Reih und Glied, sortiert nach Art und Größe, ausgelegt. Diese Aufreihung nennt der Waidmann Strecke. Dabei kann man Strecke von „strecken, gestreckt“ herleiten, weil die Jagdbeute wortwörtlich alle viere von sich streckt, nachdem sie tödlich getroffen wurde.
The "Strecke" is a place to which hunters bring the animals which they have shot.
P.S.: I hadn't read all answers before I wrote my own. @ChristianGeiselmann had already given a similar explanation.
However, Strecke is not a quantity - but a place. Jagdstrecke or short Strecke can also be used to designate the total number of animals shot during a hunt.
P.P.S.: If you want to see a "Strecke", you can use the Google image search for "Strecke Jagd". Most images are not released under a licence, which would allow to use them here. The photo below shows the "Strecke" of a driven hunt on hares. As seeing such a number of animal cadavres may provoke a strong negative reaction, I use spoiler tags.
Image from: common.wikimedia.com
"auf der Strecke bleiben" literally translates to
to stay on the track
wohl aus dem Bereich des Sports und eigentlich = bei einem [Lauf]wettbewerb nicht das Ziel erreichen
While "fall by the wayside" comes from biblical allusion, the German expression seems to be more of a metaphor. You failed something like somebody who stays on the track will never cross the finishing line.
Other than other people who answered here, I suppose that Auf der Strecke bleiben is not at all related to Strecke as track or route. Rather I suppose the phrase refers to an expression common with hunters. For them, by tradition since mediaeval times, Strecke is the quantity of animals caught and killed during the hunt, and displayed at the end of the event in a neatly arranged row somewhere on a meadow. Imagine hunters playing some music on horns in addition.
One could debate, perhaps, if Strecke first meant the entirety of killed animals, or the place to display them. I have no opinion here. In any way, today both meanings are in use metonymically.
Note that killing someobody is also
jemanden zur Strecke bringen
which definitely is not related to getting somebody to the route. It is getting somebody to be on display for successfully being hunted down and killed.
Admittedly Duden Herkunftswörterbuch (one of the more recent editions) claims that Auf der Strecke bleiben "probably" roots in sports, whereas zur Strecke bringen was related to hunting. But Duden does not give any evidence for this whatsoever, and I would dare doubting their judgement in this case. Rather than the relatively modern phenomenon of sports, a military context could be theoretically supposed, as Volker Landgraf did in his separate answer, with military men being left "on the track" during quick advance or retreat of larger military bodies. However, if that was the origin of the phrase, I would suuppose there were other words too like auf dem Marsch bleiben, which however does not exist. Contrary to that the existence of a phrase zur Strecke bringen which clearly is related to hunting, is a strong hint that also auf der Strecke bleiben is probably a hunting term.
As idmean has answered, it literally means
to stay on the track
However, it is not so much about failing but rather about not being completed, being ignored/forgotten or being put at disadvantage, see here: German examples
"Mutti bleibt auf der Strecke. Frauen im Erziehungsurlaub drohen beruflich abgehängt zu werden"; *Mum falls by the wayside. Women on maternity leave are threatened to fall behind in their jobs.
"Ihr Geld bleibt auf der Strecke - Wertverlustprognosen für die 100 meistverkauften Modelle"; Your money falls by the wayside. Lost in value predicted for top 100 sold models.
"Abrüstung bleibt auf der Strecke. An der Jahrtausendschwelle droht neue Runde im globalen Wettrüsten"; *Denuclearisation stays on the wayside. Threats of new arms race in new millenial.
"Deutsche Bahn will sparen: Behinderte Menschen bleiben auf der Strecke"; Deutsche Bahn wants to save money: Handicapped people stay on the wayside.
"Kino digital: Die Kleinen bleiben auf der Strecke" Digital cinema: Children stay on the wayside.
I delibaretely chose the wayside translation, although you probably wouldn't say it this way in English. If needed, I can provide proper translations.