Not sure- but a guess !!
Does your fuse box have a unit with a 'test' before the MCB, and is it that that is tripping ?
If so, it's an RCD unit and they are designed to trip on a L-> E fault.
When does the trip happen ?
Random
On boiler cut off (thermostat turning off system, on timer off time).
Because your in Spain it would have been better to post in Electrics (outside UK).
What make of electric boiler is it ?
If you have a separate programmer / control unit on it- is that wired via the boiler power feed, or is it tapped off either it's own circuit or off a socket circuit ?
Reason I ask is that if the control was wiring to a different circuit and that didn't 'share' the same RCD control as the boiler circuit it is possible that the RCD could see the imbalance and that might cause the trip.