I'd poke a very tentative alternative explanation for this…
I don't doubt the two terms are pretty much interchangeable, but I feel there is a slightly different flavour to them.
'Having' a holiday is just that, you are on holiday, you are 'having' it, like you'd have an ice cream whilst you're there, or like you'd have a swim.
'Spending' I think is more interested in the 'time spent' & how you spent that time.
"I spent last August in the Dordogne."
"I spent a week on holiday in Spain."
So, referring back - you can 'spend a holiday' but you're really referring to the time you spent away from home.
To torture my analysis still further, you can't spend an ice cream, or a swim, but you can spend time eating ice cream or swimming.
All I really see wrong with the OP's sentence is it ought to be
"I was having a holiday by the seaside…" as was mentioned.
I would perhaps posit that
"I was spending my holiday by the seaside" would be a useable alternative, though I'm not sure why swapping 'a' to 'my' really fixes it; perhaps it adds the personal sense of 'time spent' to the sentence.