The Puerto Ricans were 0 for 11 with runners in scoring position.
Casilla walked major league teammate Pagan on five pitches to start the eighth.
Jose Reyes tripled in the seventh for Team DR.
Attendance for the three games in the Giants' ballpark was 96,913 for a tournament total of 885,212. That surpassed the previous record of 801,410 in 2009.
Japan's loss to Puerto Rico on Sunday was watched by 51 percent of potential viewers in Japan, MLB said. It was the largest share for any of Japan's WBC games this year. The game also was the most-watched sporting event in the past year in Puerto Rico, with the final moments getting a 74 share.