I'm not talking about current machine learning algorithms, but speculative future developments where we could be developing AIs that are plausibly conscious.
How do you know for sure? :)
Neurons don't feel pain either.
In fact, the whole brain doesn't have pain receptors, which is why you can do surgery on it while the patient is awake.
So what is the concept of pain then from the brains perspective? Because it clearly knows when something hurts.