I have got the same annoying result a few times now, when making potato gratin, and something known as "french potato cake" in my country (grated potato in frying pan).
I believe that it's the potato which has a slightly off taste; bitter/metallic/raw. Some googling leads to solanine as an explanation, but I'm not completely satisfied.
Things that might be related:
- I rarely peel them (yet, I think that the same batch of potatoes, used a few days apart did taste fine the first time).
- I think that it's worse when any piece of potato isn't in direct contact with heat (i e the center of a thick potato cake or gratin)
- I almost always add raw, finely grated onions.
- Sometimes raw garlic - my impression is that it makes it worse.
- The potatoes are not green, at all, in any of these circumstances.
So my guesses are:
- Solanine, in that case solution is to peel them?
- Something related to oxidation, either in garlic/onion or perhaps catalysed by it. Solution, in that case?
- Rawness - can potatoes be soft and still be "raw"?