As I said, the past of "Time's Arrow" is common to both the prime and Abrams timelines. Therefore, anything and anyone from either timeline can travel to it. Data's head comes from the prime future, and (up until 2233) that prime future can still arise from it. Therefore the head must logically still be there.
For Data's head to vanish from the cave would mean that there is a version of the 19th century that can ONLY lead to the Abrams timeline, which is of course not the case.