The situation is not a simple copyright infringement case of Warner Brothers not obtaining any permission. The poem was created in the 1930s by Newlin, but she granted permission to Willis Music to be used as lyrics in their songbook Songs for the Nursery School. Warner Brothers obtained permission from Willis Music in 2007 for the song to be used in the show. Willis Music is also named as a defendant.
The legal question I see is whether Warner Brothers got permission as they licensed a derivative work (the song) but not the original work (the poem). My non-lawyer opinion is that the show and CBS are probably okay because they licensed the song. The merchandise is another matter and that will need a license.