Short answer
Large animals do get cancer. They may contract cancer with an incidence less than that estimated by absolute cell numbers, but there seems to be a lack of data on cancer rates in large animals to support this hypothesis conclusively.
Background
Whales contract cancer (Martineau et al, 2002). There does, however, seem to be a lack of correlation between body mass and cancer risk, which is counterintuitive since larger animals have more cells. This is known as Peto’s paradox (Caulin & Maley, 2011), after epidemiologist Richard Peto of Oxford University in the UK, who noted it in the 1970s. He reasoned that larger organisms have more potentially carcinogenic cells, tend to live longer and require more ontogenic cell divisions. Therefore, statistically, cancer incidence should scale with body size (Nagi et al., 2007).
It is thought that larger animals use protective mechanisms that many smaller animals do not. For example, blue whales have 1000 times more cells than us, if they would contract cancer at rates 1,000 times higher than humans, they would die before they were able to reproduce and the species would quickly go extinct. However, the paradox itself has been scrutinized, because there may simply be a lack of data on cancer rates in large animals (Source: Nature News, 2013). In addition, it is thought that malignant tumors are disadvantaged in larger hosts. In larger organisms, tumors may need more time to reach lethal size, so tumors have more time to evolve without becoming lethal. Hence, in large organisms, cancer may in fact be more common, but less lethal (Nagi et al., 2007).
The persistent myth that sharks don't get cancer seems to stem from clinical evidence that cartilage has antiangiogenic properties, i.e., it inhibits the development of blood vessels, which are crucial to the growth of many cancerous tumors. Since shark skeletons are made of cartilage, it was thought that they can't get cancer. Recent studies have found that while the incidence of cancer in sharks and related fishes such as rays does seem to be low, cancerous tumors, including chondromas (cancers of the cartilage), have in fact been found in sharks. The reasons for the apparently low incidence are not necessarily related to their high cartilage content, but may simply be a matter of lack of directed research on cancer in sharks and related fishes (Source: American Museum of Natural History). Indeed, tumors have been found in 23 species of sharks, measuring up to 30 cm in a Great White (Source: Scientific American, 2013).
References
- Caulin & Maley, Trends Ecol Evol (2011); 26(4): 175–82
- Martineau et al., Environ Health Perspect (2002); 110(3): 285–92
- Nagi et al., Integr Comp Biol (2007); 47(2): 317-28
P.S. All animals, including whales, age and die, otherwise the oceans would've been pretty crowded, at least before whaling started.