Is 3 and a half hours enough time to get through customs at Heathrow and still get to St Pancras for the Eurostar?
Maybe, but it is on the tight side.
The big question in my head is why are you flying to London if your destination is Paris/Brussels/Amsterdam?
Bear in mind that currently you are asked to be at St Pancras 90 minutes before your Eurostar departure. You also need a bit more than an hour to get from LHR to St Pancras.
So 3.5 hours will not be enough, unless you get very lucky.
I would not do it.
If you''re already at Heathrow, why don't you just fly to Paris or Brussels?