Who performs the checks for regulatory compliance at trade borders? Customs officers check for tax compliance at trade borders.

But who performs the checks for regulatory compliance at trade borders?

Is it simply the various Government ministries (eg the one responsible for food and agriculture), or is it Customs Officers?
The most simple and universal answer is that it is up to each government to decide if checks should be made and if so by whom.  Some have none, either because of international agreements, because they see no need, or because they lack the capacity to do so.

The most common case is, as you say, that officials from different ministries inspect goods, and food/agriculture are the most common because it's too late if you find out that pests or diseases have been imported once they're past the border.

But otherwise, countries often make efforts to reduce and simplify border checks by doing risk assessments of traders or containers (and inspecting only the risky ones), by improving cooperation between ministries, or by improving enforcement of regulations and standards behind the border.