That is just about an impossible question to answer
In Spain, inheritance tax is changed on the person inheriting, and depends on many things, family relationship, not related, resident or non-resident, and their wealth.
And then to add to the confusion, the tax is assessed by the region. Although there is a maximum permitted by central government, each region can change that amount provided it does not worsen the situation for the person paying.
If you really need to know, speak to a solicitor or accountant, and then hope that get it right !
PS However, if the property is not worth the amount outstanding on the mortgage, then there would be nothing to inherit !