Cook rice according to package directions.
Preheat oven to 350 degrees.
Melt butter in a stockpot, and add carrots, raisins, plums, and apples. Cook over medium heat until the mixture is golden brown and begins to soften.
In a large sauté pan, place a little oil, and add the onion, along with 3 generous pinches of salt. Cook until the onion is translucent. Add in the tomatoes, ham, peas, hearts of palm, and olives, and continue to sauté for a few minutes. Season to taste.
In a baking dish, place a layer of rice, half of the fruit mixture, and half of the ham mixture on top of the fruit. Continue to layer in the same order, finishing with a last layer of rice on top. Top the dish with shredded cheese.
Bake until cheese melts and serve.