It could be a breach of contract, but it would be up to a court to decide if that part of the contact is enforceable.
Guessing it's not illegal to solicit someone under such a contract, but potentially a new hire could be ordered by a court to stop working at the new company, or a 3rd party could make claims that the outputs of their former employees are owned by said 3rd party.
A lot depends on the local labor law. Here where I live (Poland and I guess same in the rest of EU), the outputs of your work which were not directly ordered by your employer or were not part of the job are not owned by the employer (and stating that in the agreement is not enforceable), even if done during working hours or done using employer's equipment. Of course you can get fired for doing a side project in the office or using the equipment without prior agreement, but you take your side-work with you.
Guessing it's not illegal to solicit someone under such a contract, but potentially a new hire could be ordered by a court to stop working at the new company, or a 3rd party could make claims that the outputs of their former employees are owned by said 3rd party.
IANAL