Is erectile dysfunction painful?

No. Erectile dysfunction (ed) is not painful. It is simply the inability to obtain or maintain an erection sufficient enough for sexual intercourse. There is a condition called peyronie's which is scarring of the chambers of the penis which can lead to bending or curvature of the penis and this can be painful but it is a seperate condition from ed.
Not physically. Erectile dysfunction though not physically painful can be emotionally crippling.