If you die intestate then any assets in Spain will be taxed at the full rate. So, making a Will is essential. Indeed, it makes sense to have a Will in Spain for your Spanish assets (lodged at the Wills Registry in Madrid) and a Will in the UK for your UK assets. However, care must be taken to ensure that the terms of one Will do not revoke the other Will and this requires the attention of a lawyer specialising in probate matters.
Spanish law defines to whom you must leave your assets. However, as a foreigner, you can leave your assets to whomsoever you wish. To ensure this, a term in your Will must state that the personal law of your country (the UK) allows for free disposition of property left by testament.