A lot of thought went into the music of the movie according to this NPR interview with composer Germaine Franco.
According to the article, when Lin Manuel Miranda began writing the music he:
“…wanted an all-Latinx musical team for Encanto, and called Franco personally to ask if she'd score the film.”
“Franco took pains throughout to steep the music, including her orchestral arrangements of Miranda's songs, in traditional Colombian instrumentation, and make room for the Colombian musicians on her team to contribute ideas and instinct into their performances.”
According to this classicfm interview with Lin Manuel Miranda he did something different to add to the authenticity of the music.
“The film marked a first for Miranda, whose fan-favourite song, ‘Dos Oruguitas’, was his first song written entirely in Spanish.”
“Miranda, who is of Puerto Rican descent, thought it important to write the acoustic song first in Spanish, before translating it to English, in order to make it sound like an authentic Colombian folk song.”
So at least one song was written in Spanish first.