I depends on the school. This is called back dooring into a major and many schools have mechanisms to prevent it. .
You also need to dig deeper into what a “good school” means. Some of the highest ranked, most selective schools actually have giant classes, heavy reliance on TAs and in general aren’t well known for their undergraduate teaching.