I hope you will remain fine only,
You have done the best thing already by washing and soap water instantly,
Exposure to Topical medicine would not affect the pregnancy
outcome at all.
But I think the cause of burning was excessive rubbing on the soft skin of belly due to baby bump,
If you also had burning sensation in hands then you have hypersensitivity
to this preparation and I would advise to avoid skin contact with that in future.