kindly see the definition of Employee unde PF Act section 2(f) clause ii which speak about that
ii) engaged as an apprentice, not being an apprentice engaged under the Apprentices Act, 1961 (52 of 1961) or under the standing orders of the establishment;
So if you have engaged such trainee as per your standing order or under Appreantice Act then they will be out or perview PF Act only.
However ESIC has Amended its definition of employee by amendment dated 24 May 2010, applicable from 1 June 2010, as per this definition the trainee/appreantice engaged either under SO or Appreantice Act, they shall be covered by the ESI Act.