It seems to me that whether the ESI/PF contributions are paid in the contractor's or the principal employer's code, the ultimate responsibility is always with the principal employer. As long as there is a genuine contract between the principal employer and the contractor (and at least principal employer registered under the Contract Act, wages are paid by the contractor, etc.), labor enforcement authorities should not mind contributions of contractor's labor submitted in the principal employer's code. As an employer, you might have every right to demand the contractor to obtain registration. Of course, I have heard that at times the authorities are not keen to register a contractor unless he/she has more than the minimum requisite number of workmen engaged under him (because they might want to keep the onus deliberately on the principal employer for justifiable reasons). Therefore, what this means is that you might have to work with larger contractors, if available, who are having a sizable number of workmen and therefore have their own codes.
Though for a young manager like me, contract labor and related matters still seem to have many areas of grayness, above is what I feel. As always, there can be no substitute for a considered labor law consultant's views, or better still, go for a word from the horse's (enforcement authority's) mouth if possible.
Best wishes