How are the themes and songs picked for a particular series? Are the opening/ending themes, insert songs, and background music created specifically for the series they represent, or are they just picked by the producers/production committee based on how well they would fit their series? 

What typically happens? What exceptions are there? How much have things changed now compared to the past?
Are the opening/ending themes, insert songs, and background music created specifically for the series they represent, or are they just picked by the producers/production committee based on how well they would fit their series? What typically happens?


In most cases, opening/ending themes, insert songs, and background music are created specifically for the series they represent. Though, it can also be picked based on it's popularity. After all, the main objective is to promote both the series and the theme songs. 


  What exceptions are there?


About exceptions, which I think can only be applicable when picking a song depends on the deal between the companies (anime production/company and music company) whether they will allow a song to be used as an anime theme song. Well, anime can be a good promoter of a theme song and vice versa so it's a win-win deal for the companies, so exceptions I guess will be all inside their agreement. 


  How much have things changed now compared to the past?


I think the only thing that has changed pertaining anime theme songs are the popularity. Anime are more popular now than before globally so there is more opportunity of a theme song to have a different versions of languages (which involves purposely creating theme songs for the anime itself).

My basis is here,


  The theme music for most anime tends to be catchy songs deliberately written for release to the pop/rock music market, if they aren't
  already actual pop/rock songs.
  
  One reason is simply that anime
  provides an easy way for both hit and entry J-pop/J-rock artists to
  get more exposure and good lateral promotion. Platinum J-rock bands
  like L'Arc~en~Ciel and Orange Range frequently release their new songs
  along as themes in anime that are on the air at the same period as
  their respective singles or albums.
  
  Another reason this is done is because many anime voice actors are
  also singers, often the more successful ones. (At least one such
  performer, Megumi Hayashibara, is both a formidable presence on
  Japanese pop charts and an internationally-known talent, as well as
  the recipient of more star and featured anime roles than any one
  person ought to have.) It's not unknown for production companies to
  organize some of their principal cast members into groups for
  recording CDs — the "Goddess Family Club" (Ah! My Goddess), DoCo
  (Ranma 1/2), the Maho-Dou (Ojamajo Doremi) and the Spirit Singers
  (Digimon Frontier) all come to mind. Either way, it's usually to a
  voice actor's advantage — they perform theme songs (as well as
  additional "character" songs), receiving a double benefit from
  exposure in two different markets (and the additional profit).
  
  A third reason is that TV theme songs are the pinnacle of Japanese
  musical success. If a Japanese artist/group makes a hit album, the
  studio takes almost all of the profits. If the same group makes an
  album as a TV tie-in, the musicians themselves receive a much larger
  cut.