The film stars Cameron Diaz as a foul-mouthed junior-high teacher trying to woo a colleague, played by Jason Segel.
Kasdan is set to direct the movie, which was written by Lee Eisenberg and Gene Stupnitsky, both of whom are writers-room fixtures for NBC’s “The Office.”
The project, which will begin production later this month, is produced by Mosaic’s Jimmy Miller.
Timberlake, who is also set to appear in David Fincher’s “The Social Network,” will play a substitute teacher who is the scion of a watchmaker fortune.
For his part, after a decade of side roles in features including "Almost Famous" and TV shows like "CSI," Stonestreet broke out this past television season on ABC’s "Modern Family," playing the cherubic gay son-in-law to Ed O'Neill.