From Words to Waves: Analyzing Concept Formation in Speech and Text-Based Foundation Models