Задача can be a fairly specific problem (e.g. an equation or a physics problem) or an objective, something you should do (regardless of whether you boss said so or you made the decision yourself).
Задание is a more vague word for assignment; it is a task assigned by someone else. The word can act as a mass noun and it does not have to involve maths. Writing an essay or picking a correct answer in a multiple-choice question can be a задание.
difficult problem. The word "hard" has many meanings and you make people choose among them when you use the word hard. The primary meaning of the word hard is the opposite of soft, very firm, solid. So are you saying"solid problem"? What is a solid problem? Don't abuse the English language just because uneducated people speak carelessly.