extract your spectrum init in a dedicated function, change it a bit the selector to get all non init ones, and just call this function after the gridster.add_widget
function addSpectrum(){
$(".flatPalette:empty").spectrum({ ... }); // :empty will get non init box
};
$('.addbox').on("click", function(){
gridster.add_widget(' ... ', 2, 1);
addSpectrum(); // add spectrum on the new box
});
addSpectrum(); // init spectrum on non dynamic box