As three different countries are involved, the problem has three distinct parts, as there are three separate and distinct national registration systems involved.
For UK built vehicles you can get a BMIHT heritage certificate for £46-odd, but the records do not include vehicles exported from the UK disassembled in crates and assembled in overseas locations (CKD vehicles).
How long has it been in the UK? You can obtain information from the DVLA using a V888 form, and MOT history including mileages is available online.
Many Land Rovers were built in South Africa including specific local market variants, with different engines and the like. You might get lucky as some UK vehicles were exported to SA, either as private imports or initial supplies before local assembly was ramped up. Try the VIN calculator here
https://www.clifton.nl/index.html?calvin.html and it should tell you if UK or overseas assembled. If UK assembled, get the heritage certificate and send a completed V888 form to the DVLA. If overseas assmbled it will be more difficult, depending on what you have already.
I also am interested in the history of the vehicles I own, and have managed to recover a decent mount of history on most cases, but in your case with it having been in three different countries, it will be much more difficult, depending on how much information you have already, registration documents and the like.
You should do a google search on how to obtain vehicle history in SA and Spain.
For example, much MOT history and motor vehicle registration data is now available online. If online searching brings no joy, you could contact Land Rover clubs in SA and Spain for advice. The Facebook Land Rover groups have members from dozens of countries, someone on one of those will point you in the right direction.