According to the Real Academia Española (RAE) [Royal Spanish Academy]:
tarea.
(Del ár. ṭaríḥa, y este de la raíz del ár. clás. {ṭrḥ}, echar).
f. Obra o trabajo.
f. Trabajo que debe hacerse en tiempo limitado.
deber.
- m. Ejercicio que, como complemento de lo aprendido en clase, se encarga, para hacerlo fuera de ella, al alumno de los primeros grados
de enseñanza. U. m. en pl.
I would tell you that in Latin America, "homework" is "tarea". Everything that is assigned by a teacher in the school or institution. I travelled for many countries in Latin America and everyone does the same translation.
"Deber" is equals to "duty" or "must". It's an obligation.
"Chore" is equals to "tarea del hogar"
"Task" is also "tarea" but it's more like an activity. Something that it's need to be done in order to fulfill a work. Imagine a process of credit card delivery.
You need to follow these steps:
- You do a submission for a credit card in a financial institution
- Then the submission will be evaluated by someone else
- Then the submission will be approved by another person
- Once approved, they will give you credit card
The process of credit card delivery is composed by 4 steps or tasks. These steps must be done in a period of time and assigned to someone. If one of these steps are not done, the process will fail.
It's probably that in Spain they use "deber" as a homework. But in Latin America is "tarea" for sure.
Some countries like Cuba (Caribe) they tend to say also "deber".
PS: Look something interesting on the RAE definition. Deber comes from Latin "debere", but tarea comes from the Arabic word taríha. Remember, in the past (711 AD) Arabs warriors invaded Spain for many years and they influenced the Spanish language.
EDIT
As many others have said, it's true when you try to use deber as a meaning for "homework", some people use deberes (in plural). However, this implies that you have many things to do. And in singular it would sound a little weird "Tengo un deber que hacer", in that case could be translated like "I have a duty". If you analyse both terms carefully by their definition according to the RAE, they are synonyms. Furthermore, I remark that in Latin America is very common the use of tarea. And as others have already confirmed, in Spain they use deberes (And according to Gorpik in some regions of Spain, they use also tarea). When I wrote this answer for your question, I didn't mention that the use of one or another is incorrect. Let me clarify that both are valid. There's no wrong answer, but I tried to give you the real definition according to the RAE, which is very important to us no matter where you are from. If you live in America, you should know now what translation fit well to you.