It is not possible to only pay off the interest on your loan rather than paying off the capital in Spain
No. Financial products in Spain are very restrictive for both residents and non-residents alike, and so interest-only mortgages are not available. In other countries, you can get mortgages that allow you to only pay off the interest on your loan rather than paying off the capital, but this is not possible in Spain.
You will be expected to pay the full capital and interest will be much higher in the first part of the loan. The capital increases as you advance through the mortgage term until the bank is no longer owed anything and the loan is repaid. This is known as the French amortization system.