Making corn bread pudding from corn bread
You can sort of substitute, yes. Bear in mind that cornbread has a far lower gluten content than wheat breads (zero gluten if there's no wheat flour in the recipe), and thus will not hold together quite as well. So you may wish to use slightly less of the custard base.

In addition, I've found that cornbread doesn't generally make a particularly nice sweet pudding; it's much better in a savoury application. So perhaps throw in some jalapeno and some goat cheese.