Raffinose is a sugar found in legumes that is indigestible by humans. Which is great, because I'm looking for a sweetener that 1) won't raise blood sugar and 2) doesn't have a bitter aftertaste and isn't carcinogenic or whatever else. The question I have is: Does raffinose break down during cooking? If heat can decompose it into other sugars then it's useless for my purposes.
In most cooked foods, it will break down.
Raffinose has a melting point of 80°C and decomposes at 118°C. So if you keep the food below 118°C, you will be OK. You can sweeten your tea with it, or use it in a custard (the big sugar molecules will interfere somewhat with the setting of the custard, but I can't predict if the effect will be noticeable at all). Applications involving simmering water should be safe, if the solution consists of water mostly. However, if you use large amounts of raffinose (e.g. you are trying to make a jam), the boiling point of the solution can be much higher than the boiling point of water.
As for baking, the raffinose will definitely decompose in the outer layers of the baked good, but this could be a very small part of the whole. The core of a properly baked cake should stay much lower than 118°C. Small items like cookies will be more problematic.
When making a substitution, you have to consider that in some recipes, sugar is more than just a sweetener. For example, I don't know if you can cream butter with raffinose the way you can do it with table sugar, and without creaming, you can't make proper cookies. Another example would be pectin: high methoxyl pectin (the one used for jams) requires high sugar concentration for gelling, so you probably can't substitute raffinose there (unless you heat it enough, because one of its decomposition products is sucrose).
Another thing to consider before eating lots of raffinose is that it is indigestible for humans and gets degraded by gut bacteria in the intestines, producing large amounts of gas - it has the same effect as eating lots of beans, for exactly the same reason.
The source for the boiling and decomposition point of raffinose is the material safety data sheet for raffinose.
For a few years between around 2004 and 2007, a number of Korean and Japanese companies started started emphasizing products sweetened with various industrially isolated oligosaccharides, which is the family of sugars that raffinose belongs to. I believe the sources commonly extracted from included soybeans and other beans, based on the information from Chinese, Korean and Japanese manufacturers I was in contact with at the time. I even ran into one Korean beverage producer that went so far as to switch from sucrose to oligosaccharides in all of their products, although I recently spotted their products at Trader Joe's and that made me realize they've since either liberalized or backtracked on that decision.
http://www.foodnavigator.com/Science-Nutrition/Novel-oligosaccharides-as-sweeteners-for-food-beverages (which has a couple of annoying interstitial and/or intrusive ads; I don't have any influence over their content, but my apologies nonetheless) seems to indicate that certain new commercially produced oligosaccharides are stable in a fairly narrow temperature and PH range, so I suspect the answer to your question is "it depends." Raffinose is apparently still a frequent subject of study, though it seems like the question you have should be reasonably well answered by now; I'm not a chemist, so I can't parse much from the research summaries I'm able to locate. But I suspect that whatever happened, the isolate oligosaccharide products turned out not to be a panacea, or at least the marketing story turned out to be inadequate to sufficiently drive sales.
http://www.jafra.gr.jp/eng/origo.html indicates that raffinose can be extracted from (some form of) beets for use as a sweetener.
In any event, there's a chance you may be able to find oligosaccharide syrup or maybe even a crystalline form if you look hard enough, and it appears, from what little I'm able to glean, that it's fairly stable, and probably not going to break down in cooking. But I suspect that, like most sugar substitutes, simply replacing your sugar consumption with an alternative sweetener won't bring about meaningful health benefits; nearly every "healthy" sweetener has some undesirable side effects when consumed in large quantities.
Personally, I have a strong bias against any attempt to treat food as some sort of medicine, and my experience is that food manufacturers have little interest in making you healthier (but they do have interest in profiting based on your motivation to be healthy), so I wouldn't put too much stock in the idea that oligosaccharides, or anything else, are a meaningfully healthier alternative to sucrose. There are probably better ways to improve your health than by relying on food technology, and consuming moderate amounts of sweeteners of any type is probably more beneficial than replacing heavy consumption of sucrose with heavy consumption of the alternative sweetener of the month. But there certainly have been efforts to commercialize oligosaccharides for the health food market, and it's probable that there's at least some data to support the notion that oligosaccharides have some health benefits of some kind.