It is the work of both HR & Finance. To prepare the documents regarding ESI & PF, Finance dept can provide details pertaining to payment, as they keep a track of it in their ledgers.
As far as HR is concerned we will be having our salary abstract.
So, I think both need to work it together.
From India, Madras