A list of positive integers has the following properties:
- The sum of the items in the list is $30$.
- The unique mode of the list is $9$.
- The median of the list is a positive integer that does not appear in the list itself.
Find the sum of the squares of all the items in the list.