Two men have been hospitalised, with one in a serious condition after being allegedly stabbed in the back of his head, following a home invasion in Sydney's west.