Yes, as long as the racial trait is not dependent on the character’s original anatomy. For example, an Owlin character that Wild Shapes into a Bear would not be able to use its Owlin flying abilities. However, an Elf would still get their Fey Ancestry advantage against being charmed.