So we know that Héctor’s songs are often about people he cares about. The most notable examples being ‘Remember Me’ (about Coco) and ‘Poco Loco’ (about Imelda).
So just saying, what if ‘The World Es Ma Familia’ was actually written for Ernesto?
For one thing, it’s the opposite of ‘Remember Me’, which was written to be sung to only one specific person, in that the song only really works when it’s being sung to an audience. Because unlike Héctor, Ernesto would never sing just for himself or a loved one. From his perspective, music is just a means to an end.
And, though obviously this wouldn’t affect how Héctor would have written it (although the film does seem to have quite a rich lore, so it wouldn’t surprise me if the filmmakers hadn’t come up with this themselves) it’s the only song Miguel ever sings for Ernesto.
Also, there’s the significance of the line, “the world es mi familia"— the world is my family. It’s kind of similar to Ernesto’s own “seize your moment” catchphrase in that it can sound pretty inspirational when you first hear it but actually has the potential to be quite disturbing in the right context. Unlike Héctor, Ernesto doesn’t feel tied to his family (though we know he must have had one, because he doesn’t deny it when Miguel asks him if it was hard to leave them— probably he had parents or siblings or something), or to his friends.
Look at how easily he turns from loving Miguel to trying to kill him— despite the fact that he never actually finds out that Miguel isn’t related to him (his response to finding out that Imelda is Miguel’s grandmother isn’t “I’m not your great-great grandfather after all?!” it’s “you’re related to Héctor?!”, which to me suggests that he’s wondering if he somehow hooked up with Héctor’s daughter or cousin or something).
Why wouldn’t he? Ernesto doesn’t need a family. The world is his family. He is on so many strangers’ offrendas that he doesn’t know what to do with all the offerings he gets— what does it matter if he has to bump off one friend to get to the top?
Apart from that, however, there’s very little meaning to the song. Admittedly it’s cut off halfway through, but the lyrics seem to just be the singer greeting the audience for an evening performance, telling them what a pleasure it is to play for them and then repeatedly telling them how much he enjoys music in general (because it allows him to communicate with people and bring them closer to him).
Even ‘Juanita’ which, since Héctor didn’t expect Miguel to have heard it, we can assume was written post mortem (head canon that it was written specifically to entertain Chicharrón— possibly as an apology for the whole femur incident) and just for fun, has more detailed lyrics than this. But it fits Ernesto, who doesn’t seem to care what he’s singing as long as the audience enjoys it.