Why can't people borrow in foreign countries? Mortgages in Germany seem to be below 0.7% atm.
You'll need a salary or other reliable income sources in the EU member state where you're buying, banks there won't offer you a mortgage. Never mind you're earning 5 times the bank employee's salary, just in another member state.
You'll need free and clear ownership of a home in the EU member state where you're earning, or banks there won't offer you a mortgage for your home in another EU member state. You'll only get the loan by mortgaging the property local to the bank, not the actual property you're buying.
Some limited exceptions exist for popular holiday countries, but banks will make you pay for that "privilege".