Doesn't matter at all. You will be able to do psych research at either place. Reputation of the research department will not matter in med school admissions, and although your undergrad reputation will, neither Duke nor Penn will hold you back (obviously). Beyond that, psych is not a very competitive specialty, and you can do more research in med school anyway.