There are many things that an cause painful sex. I would definately talk to your doctor about this. Did you have a DNC? I know that sometimes painful sex can be psychological. Maybe you are still dealing with your loss at a subconscious level and your body just isn't ready yet.
Also, your hormones could be out of whack making it more painful, less lubrication. There can be so many different things going on that can cause problems.
Painful intercourse is definitely something I would talk to my doctor about. You want to give your new little one the best chance possible. Good luck.
I think it depends on how far along you where when you had the m/c. If it hurts and you are bleeding, maybe your body hasn't healed enough yet. I know that's not the answer you probably want to hear. I had a m/c 2 months before this bean stuck. I was told that you will be more fertile for 6 months after your m/c. Maybe give it another couple weeks or til your next cycle. Good luck!