Brown the ham in a large skillet over high heat, for 5 minutes, or until slightly browned. Reduce heat to low. Add the rest of the filling ingredients. Mix well, cover, and cook over moderate heat for 10 minutes, stirring occasionally. Uncover and cook for 10 minutes more, stirring occasionally.
Meanwhile, place the water in a large pot; add the salt. Add the unpeeled plantains, halved. Boil over high heat for 15 minutes. Drain, peel, and mash the plantains; mix with the butter. Add the flour and mix.
Preheat oven to 350 degrees F. Spray a 10-inch glass pie plate with the cooking spray. Place half of the plantain mixture in the prepared pie plate and spread evenly. Top with the filling and cover with the remaining plantain mixture. Bake for 30 minutes. Serve hot.