Is blockchain protected from history spaming? As I understand, full nodes accept block even if it is not mined on top of most recent block and store it as alternative chain as long as it fullfills protocol rules.

What would happen If one start mining millions (or more) of new versions of block height 10 (based on block 9) and keep sending them to the network? Could this cause full nodes to fill their hard drives and make them inoperational?

In other words - is there a limit for side chains enforced somehow by Bitcoin Core or protocol rules?
Full nodes use checkpointing: they decide a past block (and all the blocks before it) to be definitive. Any block relayed to them that'd have happened before that checkpoint would be ignored. See this article for more details.