"For" in this instance means "for the benefit of".
"Record" in this instance means "a list of adventures". It is not a good record, of course, because the boy was misbehaving. However, other children will be impressed by what he did.
Thus, the sentence means:
"He has surely created a list of adventures for the benefit (because it helps them to dream) of thousands of children who dream of evading school.