A Microcontroller would in most cases be better for an IOT edge device, less power, smaller footprint, able to provide precise timing functions (A microcontroller is predictable for timing, a microprocessor is not)
The PI has way too many unneeded peripherals like video, ethernet and WIFI to name the big ones. it would be good as a gateway though.
I voted for the Pi, as this is the more obvious answer to these proposed two options. But I agree with fvan that there are plenty of options. As a matter of fact, I think that the point is a bit different; a serious IoT implementation (something more than the corresponding blinking LED experiment) has not a "best" between a micro controller and Embedded device (I suggest Linux but also W10 is a good player in the game). Excluding some obvious cases we always should consider and IoT application as a implementation inside an environment so I expect a design integrating micro controllers, a networked connection, sensors and a "central mind" that can be a micro controller but sure it is better considering an embedded platform (without excluding, just to consider a second alternative, the Beagle Bone)
I concur with the other two. You need to briefly scope out the requirements of what this typical IoT project would look like.
Then, if you really wanted a high level poll it would be a split between microcontrollers vs microcomputers (or single board computers). Otherwise, if you were wanting to add in more choices, for the microcontroller side, you could start by adding some of the common ARM Cortex flavours (M0, M3 & M4) as well as consider splitting out the Arduino family, and of course add in "other".
You might want an "Other" category.
As Frederick says, it depends on the application.
The RPi has much more power and complexity than an arduino and consequently can do pretty much anything the arduino can do. The converse is not true - the arduino cannot handle video and operating systems like the RPi. However, generally if an arduino can handle an application it will be much easier to use an arduino.
Depends on the IoT project? Also, there are plenty more alternatives!