Factoring out subselect (with clause) ends in ORA-00904
There seems to be an issue with the mixture of ANSI and Oracle style joins as well as the referencing of a cross joined table in a subquery.  Converting/removing these constructs, you should end up with something like this:

WITH spr0 AS (
      SELECT id FROM tka WHERE name = ?
   )
SELECT tka.id, tka.name, txt.text AS langname, einh.text AS einheit, tka.typ, vgd.a_wert,
   vgd.i_wert, vgd.r_wert, vgd.d_wert, vgd.quelle
FROM vgd vgd
CROSS JOIN spr0
JOIN vgs ON vgd.vgs_id = vgs.id AND vgs.schluessel = ?
JOIN tka tka ON tka.id = vgd.tka_id
   AND tka.txt_id_einheit = einh.id
JOIN mtdb mtdb ON tka.name = mtdb.tedabattribut 
   AND mtdb.tedabattribut IS NOT NULL 
   AND mtdb.baugruppe = ?
LEFT JOIN txt ON txt.spr_id = spr0.id ON tka.txt_id_langname = txt.id
LEFT JOIN txt einh ON einh0.spr_id = spr.id AND spr.name = ? 
WHERE tka.status = 2 AND tka.felddimension = 0 
AND NOT EXISTS
   (
      SELECT 1 FROM vgd vgd2
      WHERE vgd2.vgs_id = vgd.vgs_id AND vgd2.tka_id = vgd.tka_id AND vgd2.ai_id &gt; vgd.ai_id
   );