Why did my rum cake turn black?
This is an interesting question. Personally I would throw it out, the discoloration and resulting taste are the result of a chemical reaction with the pan.

The brownish discoloration is a sign that the Aluminium (Al, the chemical symbol for the element from here on), is being attacked by a chemical reaction. This is most likely by an acid, though salts can also cause this to happen. In both cases what is happening is that the Al is being converted into the cation Al3+. Al3+ is bio-available and considered to be the main source of Al toxicity in humans. Acute Al toxicity results in non-specific symptoms, like confusion, muscle weakness, and bone pain, however normal exposure is not considered harmful. Not a lot of long-term data has been produced, but there are potential links to things like Alzheimer's disease, and breast cancer.

The European Food Safety Authority has a limit of 1 mg/kg of body weight/week for intake from foods. This paper suggests in passing that some people are often at or beyond the EFSA limit, but this might not result in any problems, also mentioned in that paper is that the WHO has a provisional limit of 2 mg/kg/week.

Now, as to how much of the Al has dissolved into your cake, and how much you are ingesting if you ate the whole cake is impossible to estimate without measuring the Al content of the cake and syrup. Generally you will be able to taste the metallic taste of Al and other metals when they dissolve to this sort of level, though in this case, the already strong taste of rum might well overpower the metallic taste.