To enter in Spain or France, one needs the proper authorization. But the question has much to do with the "idealized" world where there are "(virtual) walls" in boundaries, and custom and immigration control at every entry point, and exactly at boundary point.
This is false. There are several kinds of boundaries, and often not very defined. The most known it is the territorial/geographic boundary. This could be no so well fixed. As example, Between Switzerland and France, and between Switzerland and Germany, some boundaries are "in the middle" of a rivers, and these dynamically changes according how much water flow in such rivers. Or from time to time Switzerland and Italy ratify new boundary lines: the official boundary is on drainage divide, but according glacier melting, this change other time.
The case in this question is similar: the territorial boundary change over time.
Custom have own boundaries. Sometime some villages are outside own country custom zone. This happens mainly on remote villages/islands. But there are also free-trade zone (mainly on commercial entry points). Not so relevant in this case (but if you put some alcohol or trade merchandise on the island, it would be interesting to see how the custom expect that you pay/not pay import taxes.
For this question, the relevant boundary is about "immigration"/police boundary. This boundary is not very well defined, and it is linked with local traditions (which were ratified by countries). This is often given for enclaves and river navigation on boundary waters, but also access to some paths and pastures for specific local communities.
I see no difference as you were hiking between France and Spain on Pyrenees: it is your duty to go to custom office and police on the first village you encounter, if you need to (entry stamps, taxes). The same, in this island: you eventually need to report to relative authorities. Being on the island, is like crossing a bridge (on boundaries) or following a road which get you to police/immigration office: you doesn't need a visa: when you got in the office, you can ask information and check if you can enter. In the contrary case, you should leave the country from the same route. Note: that zone is no-way a "nobody zone". You are not allowed to stay there. You can be forced to go to immigration office or to return back.
[If you want to camp in such island, or in any boundary zone, just notifying the local police station [in this case, of both countries] will really help you, so that you will not have the police control during night (they will already know if you are a "legal immigrant").]