Gwyneth Paltrow, Martin Freeman and Simon Pegg will take roles in “The Good Night,” a $15 million romantic comedy written and to be directed by Paltrow’s brother, Jake Paltrow. The film’s set in New York but will shoot mainly at London’s Ealing Studios. Shooting starts Nov. 7, with a few days of New York lensing scheduled for January. The wry comedy concerns a man’s search for perfection in a world where life rarely measures up to the idealized images that constantly bombard us. Freeman, who came to fame in the original Brit version of “The Office” before graduating to the bigscreen with “The Hitchhiker’s Guide to the Galaxy,” will play a former pop star now reduced to writing advertising jingles amid an early midife crisis. Pegg (“Shaun of the Dead”) and Paltrow will play supporting roles. The female lead has yet to be cast. The part is a dual role as the object of Freeman’s romantic interest takes on a very different, idealized form in his fantasies.