Donna Shalala, a Democrat who served in President Bill Clinton’s cabinet and as president of the University of Miami, won the contest to replace Ileana Ros-Lehtinen, a Republican who is retiring. While the race was tight, Ms. Shalala was generally favored to win the traditionally Republican district, which includes Miami Beach, Key Biscayne and Coral Gables, and which has been tilting more toward Democrats in recent years.