If you sepnd more than 183 days in Spain excluding the day(s) of arrival(s) and departure(s) then you would be “normally” be classed as ordinarily resident in Spain.
Have a read of this
But in any case you can’t have it both ways. You are not paying Spanish tax as you consider yourself a UK resident for tax purposes. So by definition you are not resident in Spain and hence need to pay non resident taxes on your property.
From what you say I would guess that you should be resident (for tax purposes) in either Italy or Spain, but not the UK.