As long as you do not stay for more than 180 days you are okay to remain a UK resident and for your car to be registered, taxed and insured in the UK. You need to make sure that you do not go over this as you could be considered to be a resident in Spain for tax purposes.
You will need to notify your car insurer that you want fully comprehensive cover for Spain and you will need your insurer to issue a bail bond for the car (otherwise your car can be impounded if it is involved in an accident). We use National Farmers is they charge no extra for this sort of cover.
The other problem you may have is getting long term insurance cover for both yourselves, and for your house whilst you are away. We use the Camping and Caravanning Club as they are well geared up for this and are one of the companies to offer up to 180 days cover.
Let me know if you have any other questions as I might be able to help.