Answers
Among the documents to be submitted for your residence application are: (a) the certification of the notary that the full payment of the cost of the real estate property has been completed, and the payment has no longer any conditions, exemptions or deadlines; (b) proof of title transfer from the Land Registry where the relevant contract has been transferred and a certificate issued by the Land Registry or national cadaster agency attesting to the non-existence of any mortgage or encumbrance. So a loan with the purchased property provided as security is not possible, but under other securities on your own assets is irrelevant.
If the property is mortgaged, you cannot apply for a golden visa.