Can one do an IFR departure from a small airfield with no ATC and no IAP? I don't think so, and this is why one would depart VFR.
Assuming an IMCR or IR pilot and an aircraft suitably equipped for flight in real IMC (i.e. not your typical self fly hire spamcan) there is nothing illegal about the scenario described, departing VFR and changing to IFR right away and asking for an RIS.
At say 500ft agl you will need to be very close to the radar unit to get RIS because they need both primary and secondary returns. In fact I recall something about radar units not providing a RIS below 1000ft or something like that.
I would ask the tower to call the radar unit so you takeoff with the squawk already set.
The only real danger (unless one gets into the "IMC without RIS flight is dangerous" argument, for which there is no supporting data) is that on engine failure one would have about 10 seconds to find a suitable field...
I have taken off in OVC003 but that was immediately over water, so no need to look for a field

Then climbed to FL070 and still in IMC... but icing wasn't a problem there.