The ME/IR is a rating which meens that it can be done in any of the JAR member states, so yes, it can be done in spain. You have to complete the CPL in the same JAR member state as you have taken the ATPLs, so if you do the ATPLs in the UK then you have to do the CPL in the UK (with one or two exeptions, OBA being one of them).