A flat in a horrible region of Regensburg (a very nice and very old Roman town in Bavaria) right beneath the rail tracks costs 5000-6000€/m2 (they will have nice interior though). And Regensburg is not even a high income city for software engineers in Germany.
If you do not inherit a good amount of money or earn incredible well (like >100.000€) you will forever be a "poor" man in Germany or you can sell your soul for a house and pray that you earn enough till you retire to pay back your mortgage. Taxes are just too high and income too low...