The politics of an era creates what later becomes a part of our history. Current politics also tends to influence how we interpret and understand our past. Thus, while some aspects of history may be commonly accepted between two countries, many other aspects can differ depending on the past and current politics prevalent in those countries.
That is why Pakistan and India have differing views on their history - they evolved to have different political philosophies, which influenced how they examined their own shared history.
It is important to understand that no politically experienced and sovereign country will allow any foreign organisation to dictate what is taught in their schools. Former colonies (like India, Pakistan and China, for example) understand this best, as distorting their history was one of the weapons used by the imperialists to keep them enslaved. Thus, the United Nations understands it cannot create and dictate a common curriculum of what to teach, unless specifically requested by a country.
... country A created a history curriculum that instilled hatred in its students towards country B, I would like to know if the UN has any policy in place to address this situation.
What it does instead is to present ideas and policies to UN member countries on preventing hate speech and emphasising human rights in education. It thus tries to spread awareness of current international consensus and standard on this subject:
E.g. Addressing Hate Speech Through Education, Multi-stakeholder Online Forum: meeting report
Education is an important tool for building peace, trust-building and reconciliation. The promotion of education and remembrance of atrocities are critical tools against the denial of violent pasts and of justice. Education should integrate human rights, the history of past atrocities and atrocity prevention in all levels of education. Learning about genocide and other violent pasts can help learners to respond to and prevent future atrocities, and so that hate speech and violence are not tolerated by societies.
Education can employ hate speech to dehumanize certain groups, promote antisemitism, anti-Muslim hatred, racism and other forms of discrimination against vulnerable groups in societies. Examples include school textbooks in Rwanda which described the Tutsi in dehumanizing ways prior to the 1994 genocide of the Tutsi. Hate speech and exclusionary narratives should be removed from curricula, textbooks and educational resources. Those who incite hatred and violence, instil fear and commit atrocities, must be held accountable, including by using education as a tool of justice.
... It is clear that no genocide or atrocity crime happens without being preceded by hate speech. How we educate about hate speech is therefore extremely important: through different subjects, learning about different cultures and religions, and teaching the values of equality and respect for one another - Alice Wairimu Nderitu, United Nations Special Adviser on the Prevention of Genocide