Question: 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"?

Answer: 
My prefered literal translation would be "left/remain on the way/track" - never arrived or finished. (I would not translated it into "stay on track" - this would rather translate to "in der Spur bleiben".)
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](https://www.redensarten-index.de/suche.php?suchbegriff=%7E%7Eauf%20der%20Strecke%20bleiben&bool=relevanz&suchspalte%5B%5D=rart_ou)

> 
> "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.