J.K. Rowling used no pseudonym for The Casual Vacancy; she published it under her established name.
The Casual Vacancy appeared in 2012 with J.K. Rowling identified as its author. This distinguishes it from the Cormoran Strike crime novels, which were initially published under the pseudonym Robert Galbraith. Rowling’s use of that separate name became public after the pseudonym was revealed in 2013.
The question can cause confusion because Rowling has written in several genres and under different author identities. The Casual Vacancy was openly promoted as her first novel for adults, while the Robert Galbraith books were presented as crime fiction by a new author. The two publishing approaches served different literary projects.
No pen name is attached to The Casual Vacancy’s original publication. Its author credit, title, and setting are separate from the later crime series and from the fictional textbook associated with Newt Scamander in the Harry Potter universe.