Note the pronunciation: ái (2nd tone), not āi (1st tone). Other ái compounds: 挨骂 (get scolded), 挨饿 (go hungry), 挨冻 (suffer from cold). All describe enduring something unpleasant.
culture
落后就要挨打 is a famous political saying in China, meaning 'backwardness leads to being bullied.' It reflects the national memory of being weakened and invaded in the 19th-20th centuries.